diff --git a/spec/custom/index.html b/spec/custom/index.html index cbf59dbb..f8aeae75 100644 --- a/spec/custom/index.html +++ b/spec/custom/index.html @@ -749,6 +749,19 @@
DocumentNotably, all the of the ways in which button
is special apply to such "plastic buttons" as well: their focus behavior, ability to participate in form submission, the disabled
attribute, and so on.
+This may belong in HTML, not DOM? Part of the semantics section?
+
+When authoring custom element constructors, developers are bound by the following conformance requirements:
+
+
+ - A parameter-less call to
super()
must be the first statement in the constructor body, to establish the correct prototype chain and this
value before any further code is run.
+ - A
return
statement must not appear anywhere inside the constructor body.
+ - The element's attributes and children must not be inspected, as in the non-upgrade case none will be present, and relying on upgrades makes the element less usable.
+ - The element must not gain any attributes or children, as this violates the expectations of consumers who use the
createElement
or createElementNS
methods.
+ - In general, work should be deferred to
attachedCallback
as much as possible—especially work involving fetching resources or rendering.
+ - In general, the constructor should be used to set up initial state and default values.
+
+