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

Make sure open returns boolean #8

Merged
merged 2 commits into from
Mar 10, 2018
Merged

Make sure open returns boolean #8

merged 2 commits into from
Mar 10, 2018

Conversation

muan
Copy link
Collaborator

@muan muan commented Mar 6, 2018

This sets get for the open property and test to make sure it works.

cc @javan

@muan muan changed the title Make sure open returns boolean and setting open works Make sure open returns boolean Mar 7, 2018
@@ -35,6 +35,8 @@ polyfillProperties = ->

Object.defineProperties prototype,
open:
get: ->
@hasAttribute("open")
Copy link
Owner

@javan javan Mar 7, 2018

Choose a reason for hiding this comment

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

Since prototype might be HTMLUnknownElement (instead of HTMLDetailsElement when supported natively), we need to check if tagName is DETAILS and make sure to call the original geter. Just like the seter does.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Thanks! ⭐

@javan javan merged commit b678f3f into javan:master Mar 10, 2018
@javan
Copy link
Owner

javan commented Mar 10, 2018

Thank you! Made a tiny tweak in dc624c8 and published 2.0.1.

@muan muan deleted the muan/open branch March 12, 2018 06:00
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.

None yet

2 participants