diff --git a/src/instance/base.js b/src/instance/base.js index ad28959..13e5b7a 100644 --- a/src/instance/base.js +++ b/src/instance/base.js @@ -64,6 +64,16 @@ if (this.enteredView) { this.enteredView(); } + // NOTE: domReady can be used to access elements in dom (descendants, + // ancestors, siblings) such that the developer is enured to upgrade + // ordering. If the element definitions have loaded, domReady + // can be used to access upgraded elements. + if (!this.hasBeenAttached) { + this.hasBeenAttached = true; + if (this.domReady) { + this.async('domReady'); + } + } }, detachedCallback: function() { if (!this.preventDispose) { diff --git a/test/html/ctor.html b/test/html/ctor.html new file mode 100644 index 0000000..549b4c3 --- /dev/null +++ b/test/html/ctor.html @@ -0,0 +1,60 @@ + + +
+