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

Publishing an attribute named 'disabled' generates exception in IE10 #372

Closed
sorvell opened this issue Dec 13, 2013 · 3 comments
Closed

Comments

@sorvell
Copy link
Contributor

sorvell commented Dec 13, 2013

<polymer-element name="x-test" attributes="disabled">

TypeError: Unable to get property 'disabled' of undefined or null referenceTypeError: Unable to get property 'disabled' of undefined or null reference.

The error occurs when the 'disabled' property's value is looked up on the base prototype, in this case and object derived from Object.create(HTMLElement.prototype).

This error may be influenced by the ShadowDOM polyfill, but note that in IE10, just doing this generates an error.

Object.create(HTMLElement.prototype).disabled 
"Invalid calling object"

This behavior may just need to be documented.

@sorvell
Copy link
Contributor Author

sorvell commented Dec 13, 2013

The core issue is this: #123

@JanMiksovsky
Copy link

FWIW, I'm hitting what appears to be this same issue in IE 11 as well (version 11.0.9600.16476).

It looks like there's a pending pull request to at least warn users about this, but I wanted to relate an experience trying to work around this annoying behavior in IE. To get a custom element to work in IE, I tried renaming its "disabled" attribute to "isDisabled" (with a capital "D"). The latter still caused IE to choke. It appears that "isDisabled" is itself a magic property in IE. When I changed my attribute to "isdisabled" (lowercase "D"), IE tolerated it. I mention this in case others try to work around IE's problem with "disabled" with the still-somewhat-legible isDisabled name. That won't work. sigh

@sorvell
Copy link
Contributor Author

sorvell commented Aug 11, 2014

Closed in favor of #123

@sorvell sorvell closed this as completed Aug 11, 2014
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

No branches or pull requests

2 participants