Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: sky/specs/apis.md

Issue 701873004: Specs: define registerElement() more carefully; add an 'end tag (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/radio.sky ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/specs/apis.md
diff --git a/sky/specs/apis.md b/sky/specs/apis.md
index d2701756d78f1dfc618fd3e9f6cadfd0705d2106..2ce493dbca9bc7c4794c9cc99613168765a3e6b7 100644
--- a/sky/specs/apis.md
+++ b/sky/specs/apis.md
@@ -101,6 +101,7 @@ module 'sky:core' {
readonly attribute ShadowRoot? shadowRoot; // O(1) // returns the shadow root
Array<ContentElement> getDestinationInsertionPoints(); // O(N) in number of insertion points the node is in
+ virtual void endTagParsedCallback(); // noop
virtual void attributeChangeCallback(String name, String? oldValue, String? newValue); // noop
// TODO(ianh): does a node ever need to know when it's been redistributed?
}
@@ -284,6 +285,16 @@ module 'sky:core' {
// if you call registerElement() with an object that was created by
// registerElement(), it just returns the object after registering it,
// rather than creating a new constructor
+ // otherwise, it proceeds as follows:
+ // 0. let prototype be the prototype passed in (defaulting to Element)
+ // 1. let constructor be prototype.constructor
+ // 2. create a new Function that:
+ // 0. throws if not called as a constructor
+ // 1. initialises the shadow tree is shadow on the options is true
+ // 2. calls constructor, if it's not null, with the module as the argument
+ // 3. let that new Function's prototype be the aforementioned prototype
+ // 4. let that new Function have tagName and shadow properties set to
+ // the values passed in
ScriptElement? currentScript; // O(1) // returns the <script> element currently being executed if any, and if it's in this module; else null
}
« no previous file with comments | « sky/examples/radio.sky ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698