Skip to content

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
Co-authored-by: Thomas Honeyman <admin@thomashoneyman.com>
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