-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Cannot extend HTMLElement on IE11 with dcl 1.1.3 #18
Comments
Thank you for the bug request with the repro case. Is it specific to a certain browser or can be demonstrated on all of them? UPDATE: I see it fails on IE11. I believe it was already reported, but I'll double-check it. |
It also fails on safari. |
OK, in this case we need a comprehensive solution. :-( I'll see what I can do. |
To be clear, the regression is just from b4b492c, so the easiest thing would be to rollback that change. You could also probably change the check to be something more permissive, like |
I don't want to special-case There are several problems here:
Until we have maps of ES6 we cannot associate data with abstract immutable objects. One possible hack is to use an output of In any case adding an additional way to associate arbitrary data complicates everything. That's why I am taking my time to resolve the issue generally rather than specifically for |
You can solve all those problems by rolling back b4b492c. Also, I have no idea why you are talking about attaching properties to a constructor. AFAICT that wouldn't help solve this issue at all. |
The code in question adds a property In general
Obviously both of them may fail on immutable objects, and the only sure way to deal with them are ES6-style maps, which are years away. Or invent a way to remove the necessity of modifying them at all. |
OK I see now why you are setting |
It should be refactored. In general I think |
@uhop any news? |
@cjolif Struggling with performance tests. V8 does not optimize functions that use |
Addressed in 2.0. |
On the delite/deliteful IBM's projects we are using dcl to extend HTMLElement and create custom elements.
Until version 1.1.2 it works good, but with the change introduced on version 1.1.3 (on this commit)
It does not work anymore.
I think that validation is because usually what we think of as "classes" are actually (technically) javascript functions, but we are extending HTMLElement and that typeof HTMLElement returns "function" on chrome and firefox, but at least on Internet Explorer it returns "object".
So something as simple as dcl(HTMLElement, {}) will fail.
What do you think about it ?
The text was updated successfully, but these errors were encountered: