-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Getters and setters made inaccessible #2348
Comments
Forgot to write, under native Shadow DOM it works properly O_o. |
Did you register |
Well, it is not actually a dependency, but yes, it turns out that |
Because Where is the simplified example? Also, your code above is in CoffeeScript, which is not the lingua franca here, would be easier if it were in straight JavaScript. |
If I'm reading this correctly, the See: Specifically: "Within a given tree, ready is generally called in document order, but you should not rely on the ordering of initialization callbacks between sibling elements, or between a host element and its light DOM children." (emphasis added) There are a couple of workarounds here: instead of setting the property Or: have the button fire an event to the parent from its There is an open feature request to add a callback when an element's distributed children change -- I think that will make a lot of these cases simpler. |
I thought elements are upgraded when all of them are registered, so their order in DOM and order of importing doesn't actually matter unless they extend each other.
Simplified example should be like this: But that particular example doesn't reproduce in isolation an issue I experience. @arthurevans, actually it seems to be true, however, please, take a look at PR #2349, it actually checks whether anything among declared properties was assigned in between directly, uses that and drops original property to open access to getters/setters again. This doesn't hurt performance in any significant way, but solves this issue and one more very efficiently. |
At the moment when
button.active
is assigned (atcreatedCallback
of[is=cs-nav-tabs]
, you know), there are no getters/setters yet inbutton
element, which eventually makes accessors below this newly declared property in prototypes chain and basically inaccessible.Firefox Nightly, Shadow DOM polyfill
The text was updated successfully, but these errors were encountered: