Skip to content

Add support for ShadowRoot API #34

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

Merged
merged 4 commits into from
Jan 13, 2021
Merged

Conversation

lsgro
Copy link
Contributor

@lsgro lsgro commented Jan 6, 2021

Description

Basic implementation of the shadow-root functionality, as per DOM standard.
The function attachShadow is a binding to the corresponding DOM JavaScript function described
on MDN.

Comment on lines 24 to 25
attachShadow :: ShadowRootMode -> Element -> Effect ShadowRoot
attachShadow = _attachShadow <<< modeToProps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest this belongs in Web.DOM.Element, since the member is part of the Element interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Gary, thank you for the suggestion. I have moved the function and related stuff to Web.DOM.Element and updated it to accept an argument of type ShadowRootInit type as per the specs.

@lsgro
Copy link
Contributor Author

lsgro commented Jan 13, 2021

Hello! Please let me know if there's any other change you would suggest, or if the scope of this PR is not relevant for some reason! Cheers

@JordanMartinez JordanMartinez merged commit 3adcd65 into purescript-web:master Jan 13, 2021
sigma-andex pushed a commit to working-group-purescript-es/purescript-web-dom that referenced this pull request Apr 14, 2022
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.

4 participants