Comments (8)
Actually, checking for document.readyState === 'complete' isn't enough when using Polymer. We should check for CustomElements.ready.
And we need a WebComponentsReady event listener, not a DOMContentLoaded listener. Polymer fires a WebComponentsReady event when it sets CustomElements.ready.
from core.
X-Tag linens for WebComponentsReady as the trigger for DOMComponentsLoaded
;)
On Oct 1, 2013 9:15 AM, "smcmurray" [email protected] wrote:
Actually, checking for document.readyState === 'complete' isn't enough
when using Polymer. We should check for CustomElements.ready.And we need a WebComponentsReady event listener, not a DOMContentLoaded
listener. Polymer fires a WebComponentsReady event when it sets
CustomElements.ready.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-25464715
.
from core.
@csuwldcat Yes, I noticed that DOMComponentsLoaded triggers from a WebComponentsReady event.
Btw, googlearchive/CustomElements#65 points to some problems with Polymer's WebComponentsReady.
How implementation-specific are CustomElements.ready and WebComponentsReady? Are those what we want to use?
from core.
Ugh, I told the Google folks to add the interactive state check a long time
ago. I'll ping their team again.
On Oct 1, 2013 9:35 AM, "smcmurray" [email protected] wrote:
@csuwldcat https://github.com/csuwldcat Yes, I noticed that
DOMComponentsLoaded triggers from a WebComponentsReady event.Btw, https://github.com/Polymer/CustomElements/pull/65/files points to
some problems with Polymer's WebComponentsReady.How implementation-specific are CustomElements.ready and
WebComponentsReady? Are those what we want to use?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-25466508
.
from core.
https://github.com/smcmurray/core/blob/WebComponentReady/src/core.js invokes document.register from an event handler.
This complicates the return value of xtag.register
from core.
@smcmurray this has nothing to do with the X-Tag code catching WebComponentsReady and dispatching its own event, it's an issue with the polyfill bootstrapping code. I'm going to close out this issue in favor of an issue I just filed with the CustomElements polyfill: https://github.com/Polymer/CustomElements/issues/68
from core.
@csuwldcat Separate from the issue of interactive readystate, there is still the issue that document.register can't be invoked until CustomEvents.ready. That's an x-tag issue, which among other things complicates the return value of xtag.register.
from core.
"Separate from the issue of interactive readystate, there is still the issue that document.register can't be invoked until CustomEvents.ready. That's an x-tag issue, which among other things complicates the return value of xtag.register."
X-Tag is loaded after the polyfill, so document.register() is defined. In the polyfill, they cache the registrations and call them when the polyfill is ready to do so. All X-Tag requires is that doc.register() be defined.
from core.
Related Issues (20)
- this.innerHTML in V2 throws recursion error. HOT 33
- enhancement question HOT 4
- this.outerHTML is undefined HOT 5
- Setter on attr camel cases doesn't set the proper dashed attribute value. HOT 6
- Using setAttribute is unstable HOT 3
- Is this project still supported? Are any additional releases planned? HOT 1
- template attr from last commit
- v2 docs Pseudos versus Jasmine tests
- include information about ie9 -ie11 compat HOT 3
- experimenting with type renders
- Ability to define placeholder for inner HTML HOT 3
- V1 lifecycle compatibility HOT 4
- Website :: Clock not operating properly on safari mobile HOT 4
- IDEA: V1 FINAL PATCH HOT 4
- XTagElement is not defined HOT 3
- Issues @ x-tag.github.io/docs
- package.json needs to be updated HOT 2
- lit-element? I'm confused :/
- Migration guide || equivalents of inserted/...? HOT 1
- Status of project HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.