GithubHelp home page GithubHelp logo

Comments (8)

smcmurray avatar smcmurray commented on August 27, 2024

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.

csuwildcat avatar csuwildcat commented on August 27, 2024

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.

smcmurray avatar smcmurray commented on August 27, 2024

@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.

csuwildcat avatar csuwildcat commented on August 27, 2024

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.

smcmurray avatar smcmurray commented on August 27, 2024

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.

csuwildcat avatar csuwildcat commented on August 27, 2024

@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.

smcmurray avatar smcmurray commented on August 27, 2024

@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.

csuwildcat avatar csuwildcat commented on August 27, 2024

"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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.