Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update browser script to make changeable the target root #185

Merged
merged 6 commits into from
Aug 18, 2020

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Aug 18, 2020

Updated browser script to make changeable the target root. It brings that Marp slides can render correctly within the shadow root (Web Components).

The target root will change depending on the root node of an injected script automatically.

If using module from @marp-team/marp-core/browser, developer can change the target by passing the node in first argument.

import browser from '@marp-team/marp-core/browser`

// Apply to the shadow root
const container = document.querySelector('.marp-container')
const cleanup = browser(container.shadowRoot)

observe(), a detailed interface, has changed the form of argument to object. A previous boolean argument has deprecated and will be transformed to corresponding option if used.

@yhatt yhatt merged commit d232e37 into master Aug 18, 2020
@yhatt yhatt deleted the update-browser-script branch August 18, 2020 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant