Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate callback invocation with IDL #186

Closed
hayatoito opened this issue Jul 6, 2015 · 16 comments
Closed

Integrate callback invocation with IDL #186

hayatoito opened this issue Jul 6, 2015 · 16 comments

Comments

@hayatoito
Copy link
Contributor

Title: [Custom]: make callbacks more explicit (bugzilla: 24579)

Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24579


comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24579#c0
Anne wrote on 2014-02-07 11:00:05 +0000.

"Any time a script calls a method, reads or sets a property that is implemented by the user agent, the following actions must occur: "

This needs to become part of the actual algorithms such as innerHTML, cloneNode(), etc. The easiest way to do that is tying it to IDL I think just as is done in the Chrome implementation.

I recommend working with heycam on doing that per my outline in http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0142.html as that makes it much more explicit when everything happens relative to each other.


comment: 1
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24579#c1
Anne wrote on 2014-02-07 11:01:53 +0000.

Note that we also need this mechanism for callbacks implemented by the user agent. E.g. when adoption happens we want to queue a callback that runs before the method that caused the adoption to return and mangles prototypes.


comment: 2
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24579#c2
Dimitri Glazkov wrote on 2014-05-09 20:32:46 +0000.

I was just reading up on extended attributes: http://heycam.github.io/webidl/#idl-extended-attributes.

A simple ExtendedAttributeNoArgs thingy should suffice in this case -- something like [InvokesCustomElementCallbacks] or [ProcessesCustomElementCallbacks] or [ElementCallbackBarrier]?

Heycam, should I just write this down in custom elements spec, or should it be part of Web IDL spec, like ES-specific attributes: http://heycam.github.io/webidl/#es-extended-attributes?


comment: 3
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24579#c3
Dimitri Glazkov wrote on 2014-10-27 17:34:02 +0000.

*** Bug 27179 has been marked as a duplicate of this bug. ***


comment: 4
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24579#c4
Anne wrote on 2014-10-27 17:42:42 +0000.

(Currently Web IDL offers no way for other specifications to define extended attributes.)

@rniwa
Copy link
Collaborator

rniwa commented Mar 1, 2016

Also see the issue #225.

@domenic domenic self-assigned this Mar 11, 2016
@annevk annevk changed the title [Custom]: make callbacks more explicit (bugzilla: 24579) Integrate callback invocation with IDL Mar 29, 2016
@domenic
Copy link
Collaborator

domenic commented Apr 4, 2016

So, I started on this in a branch: https://rawgit.com/w3c/webcomponents/ce-reactions-idl/spec/custom/index.html#web-idl-customelementreactions (the list of integrations is rather incomplete)

Please read the "NOTE" about why we're doing this to make sure I haven't misinterpreted.

Here are some problems I foresee, after spending about an hour going through all of Blink's annotations:

  • Blink's [Reflect] (which I assume all other browsers have some variation of) implies their [CustomElementCallbacks].
    • I don't want to block this on specifying [Reflect] as an extended attribute.
    • I could put in a sentence where HTML defines reflection saying "this implies [CustomElementReactions] behavior" or similar. Pretty lame, but maybe the best we're going to get.
    • However, in Blink some reflected attributes are reflected manually, and still get [CustomElementCallbacks]. Assuming this is the case for other browsers too, it seems like an easy way for things to slip through the cracks and become non-interoperable.
    • I guess I could go through every single element in HTML and find all the reflected attributes and annotate them with [CustomElementReactions]? Maybe that's not so bad if this is just a prelude to later replacing it with [Reflect] variants?
  • innerText and outerText don't have a spec, but need these annotations. I guess we could put them in https://rocallahan.github.io/innerText-spec/ and hope people remember that?
  • Prefixed attributes don't have a spec (e.g. webkitdropzone).
  • XSLTProcessor doesn't have a spec (see wiki entry)
  • Aren't these supposed to fire on editing operations? The extended attribute doesn't take care of those cases, does it? How would we do it?

I kind of want to give up and go back to the "every attribute and every property do this; optimize away unnecessary cases" idea. Are we sure that explicitly annotating everything is the right move?

@annevk
Copy link
Collaborator

annevk commented Apr 5, 2016

Aren't these supposed to fire on editing operations? The extended attribute doesn't take care of those cases, does it? How would we do it?

Presumably these operations are (will be, more likely, if ever) defined as running these as part of some kind of task. So perhaps the microtask checkpoint also needs to run element callbacks if they haven't been run yet?

As for the rest, IDL needs to be changed to account for this. Whether we enumerate the places for which it matters or leave that up to implementations is less important, but it seems that if everyone needs to do that work anyway, it might help if we did it for everyone.

@domenic
Copy link
Collaborator

domenic commented Apr 5, 2016

Presumably these operations are (will be, more likely, if ever) defined as running these as part of some kind of task. So perhaps the microtask checkpoint also needs to run element callbacks if they haven't been run yet?

It's not that simple. You need to push an element queue on when the operation starts, and pop it when it stops. I guess we could push one on at the start of every task, and pop at the end? @dglazkov, @esprehn, do you know how Blink handles this with regard to editing operations?

As for the rest, IDL needs to be changed to account for this. Whether we enumerate the places for which it matters or leave that up to implementations is less important, but it seems that if everyone needs to do that work anyway, it might help if we did it for everyone.

Why, and how, would we change IDL if we don't enumerate the places that need the extended attribute? Do you have thoughts about how to handle reflection, and how to handle the things that don't have a spec?

@annevk
Copy link
Collaborator

annevk commented Apr 5, 2016

We'd just do it for everything (which will result in a no-op mostly, since no callbacks will have been queued). Changing IDL makes it much more clear where in the flow of code this happens, which will be in IDL in all implementations.

Things that don't have a spec will need to be defined, since it's unclear how they work anyway, with or without this feature.

@domenic
Copy link
Collaborator

domenic commented Apr 5, 2016

Ah, I see, so you're saying change the definition of IDL attributes and operations to include these before/after steps in all of them, instead of having the monkeypatch be in HTML. OK, that's certainly doable and reasonable.

I'm going to tag this "needs consensus" since if we have time I'd like to discuss it on the telecon today. It seems largely a question of what implementers would prefer, since from a spec side, doing it everywhere is equivalent to annotating everything individually.

We'll need to solve the editing operations issues separately of course.

@dglazkov
Copy link
Contributor

dglazkov commented Apr 5, 2016

FWIW, editing operations was the other reason for base element queue, I guess 😄

@domenic
Copy link
Collaborator

domenic commented Apr 5, 2016

Now you tell me 👿

Seems like editing spec needs a monkeypatch too... ick.

@dglazkov
Copy link
Contributor

dglazkov commented Apr 5, 2016

👀

@domenic
Copy link
Collaborator

domenic commented Apr 5, 2016

Telecon implementer feedback: everyone wants me to patch all the specs with [CustomElementReactions]. Will do.

@domenic
Copy link
Collaborator

domenic commented Apr 18, 2016

Documenting my progress:

Domenic@Andeddu MINGW64 /c/chromium/src/third_party/WebKit/Source (master)
$  find . -name '*.idl' -exec grep -E CustomElementCallbacks\|Reflect {} \; -print > cecallbacks.txt

gives

    [Reflect]const unsigned short ELEMENT_NODE = 1;
./bindings/scripts/testdata/test_interface.idl
// for SVG interfaces (to use SVGNames for [Reflect] attributes)
    [Reflect] attribute DOMString type; // Test SVGNames namespace
./bindings/tests/idls/core/SVGTestInterface.idl
    [Reflect=IMPLEMENTS_REFLECT_CONSTANT] const unsigned short IMPLEMENTS_CONSTANT_2 = 2;
./bindings/tests/idls/core/TestImplements.idl
    [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1;
./bindings/tests/idls/core/TestInterface.idl
    [Reflect] attribute DOMString reflectStringAttribute;
    [Reflect, URL] attribute DOMString reflectUrlStringAttribute;
./bindings/tests/idls/core/TestInterfaceNode.idl
    [Reflect=CONST_IMPL] const short CONST_JAVASCRIPT = 1;
    [CustomElementCallbacks] readonly attribute long customElementsCallbacksReadonlyLongAttribute;
    [Reflect] attribute TestInterface reflectTestInterfaceAttribute;
    [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNameAttributeTestAttribute;
    // [Reflect] exceptional types: exceptional getters, exceptional setters,
    [Reflect] attribute boolean reflectBooleanAttribute;
    [Reflect] attribute long reflectLongAttribute;
    [Reflect] attribute unsigned short reflectUnsignedShortAttribute;
    [Reflect] attribute unsigned long reflectUnsignedLongAttribute;
    // [Reflect] exceptional names
    [Reflect] attribute DOMString id;
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString class;
    [Reflect=id] attribute DOMString reflectedId;
    [Reflect=name] attribute DOMString reflectedName;
    [Reflect=class] attribute DOMString reflectedClass;
    [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribute;
    [Reflect, ReflectOnly=("Per","Paal","Espen")] attribute DOMString limitedToOnlyAttribute;
    [Reflect=other, ReflectOnly=("Value1","Value2")] attribute DOMString limitedToOnlyOtherAttribute;
    [Reflect, ReflectOnly=("rsa","dsa"), ReflectMissing="rsa"] attribute DOMString limitedWithMissingDefaultAttribute;
    [Reflect, ReflectOnly=("ltr","rtl","auto"), ReflectMissing="auto", ReflectInvalid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute;
    [Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymous", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute;
    [Reflect, ReflectOnly=("empty","missing","invalid","a-normal"), ReflectEmpty="empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute DOMString limitedWithEmptyMissingInvalidAttribute;
    [Reflect, URL] attribute DOMString urlStringAttribute;
    [Reflect=reflectUrlAttribute, URL] attribute DOMString urlStringAttribute;
    [CustomElementCallbacks] void customElementCallbacksVoidMethod();
./bindings/tests/idls/core/TestObject.idl
    [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1;
./bindings/tests/idls/modules/TestInterface5.idl
    [ImplementedAs=valueForBindings, CustomElementCallbacks] attribute DOMString value;
./core/dom/Attr.idl
    [RaisesException, CustomElementCallbacks] void remove();
./core/dom/ChildNode.idl
    [CallWith=ScriptState, CustomElementCallbacks, RaisesException] void define(DOMString name, Function constructor, optional ElementRegistrationOptions options);
./core/dom/custom/CustomElementsRegistry.idl
    [NewObject, CustomElementCallbacks, PerWorldBindings, RaisesException] Element createElement(DOMString localName);
    [NewObject, CustomElementCallbacks, RaisesException] Element createElementNS(DOMString? namespaceURI, DOMString qualifiedName);
    [NewObject, CustomElementCallbacks, RaisesException] Node importNode(Node node, optional boolean deep = false);
    [RaisesException, CustomElementCallbacks] Node adoptNode(Node node);
    [CustomElementCallbacks] attribute DOMString title;
    [CustomElementCallbacks] attribute DOMString dir;
    [RaisesException=Setter, CustomElementCallbacks, PerWorldBindings] attribute HTMLElement? body;
    [Custom, CustomElementCallbacks, RaisesException] void open();
    [CallWith=EnteredWindow, CustomElementCallbacks, RaisesException] void write(DOMString... text);
    [CallWith=EnteredWindow, CustomElementCallbacks, RaisesException] void writeln(DOMString... text);
    [CustomElementCallbacks, MeasureAs=DocumentDesignMode] attribute DOMString designMode;
    [CustomElementCallbacks, RaisesException] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = "");
    [CallWith=ScriptState, CustomElementCallbacks, RaisesException, MeasureAs=DocumentRegisterElement] CustomElementConstructor registerElement(DOMString type, optional ElementRegistrationOptions options);
    [CustomElementCallbacks, PerWorldBindings, RaisesException] Element createElement(DOMString localName, DOMString? typeExtension);
    [CustomElementCallbacks, RaisesException] Element createElementNS(DOMString? namespaceURI, DOMString qualifiedName, DOMString? typeExtension);
./core/dom/Document.idl
    [RaisesException, CustomElementCallbacks] void add(DOMString... tokens);
    [RaisesException, CustomElementCallbacks] void remove(DOMString... tokens);
    [RaisesException, CustomElementCallbacks] boolean toggle(DOMString token, optional boolean force);
    [RaisesException, CustomElementCallbacks] boolean supports(DOMString token);
./core/dom/DOMTokenList.idl
    [Reflect] attribute DOMString id;
    [Reflect=class] attribute DOMString className;
    [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name, DOMString value);
    [RaisesException, CustomElementCallbacks] void setAttributeNS(DOMString? namespaceURI, DOMString name, DOMString value);
    [CustomElementCallbacks] void removeAttribute(DOMString name);
    [CustomElementCallbacks] void removeAttributeNS(DOMString? namespaceURI, DOMString localName);
    [RaisesException, CustomElementCallbacks] Attr? setAttributeNode(Attr attr);
    [RaisesException, CustomElementCallbacks] Attr? setAttributeNodeNS(Attr attr);
    [RaisesException, CustomElementCallbacks] Attr removeAttributeNode(Attr attr);
    [RaisesException, CustomElementCallbacks] Element? insertAdjacentElement(DOMString where, Element element);
    [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] attribute DOMString innerHTML;
    [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] attribute DOMString outerHTML;
    [CustomElementCallbacks, RaisesException] void insertAdjacentHTML(DOMString position, DOMString text);
    [RuntimeEnabled=ShadowDOMV1, Reflect] attribute DOMString slot;
./core/dom/Element.idl
    [RaisesException, CustomElementCallbacks, MeasureAs=NamedNodeMapSetNamedItem] Attr? setNamedItem(Attr attr);
    [RaisesException, CustomElementCallbacks, MeasureAs=NamedNodeMapSetNamedItemNS] Attr? setNamedItemNS(Attr attr);
    [RaisesException, CustomElementCallbacks, MeasureAs=NamedNodeMapRemoveNamedItem] Attr removeNamedItem(DOMString name);
    [RaisesException, CustomElementCallbacks, MeasureAs=NamedNodeMapRemoveNamedItemNS] Attr removeNamedItemNS(DOMString? namespaceURI, DOMString localName);
./core/dom/NamedNodeMap.idl
    [CustomElementCallbacks] attribute DOMString? nodeValue;
    [TreatUndefinedAs=NullString, CustomElementCallbacks] attribute DOMString? textContent;
    [CustomElementCallbacks] void normalize();
    [NewObject, CustomElementCallbacks] Node cloneNode(optional boolean deep = false);
    [CustomElementCallbacks, PerWorldBindings, RaisesException] Node insertBefore(Node node, Node? child);
    [CustomElementCallbacks, PerWorldBindings, RaisesException] Node appendChild(Node node);
    [CustomElementCallbacks, PerWorldBindings, RaisesException] Node replaceChild(Node node, Node child);
    [CustomElementCallbacks, RaisesException] Node removeChild(Node child);
./core/dom/Node.idl
    [RaisesException, CustomElementCallbacks] void deleteContents();
    [NewObject, RaisesException, CustomElementCallbacks] DocumentFragment extractContents();
    [NewObject, RaisesException, CustomElementCallbacks] DocumentFragment cloneContents();
    [RaisesException, CustomElementCallbacks] void insertNode(Node node);
    [RaisesException, CustomElementCallbacks] void surroundContents(Node newParent);
    [NewObject, RaisesException, CustomElementCallbacks] DocumentFragment createContextualFragment(DOMString fragment);
./core/dom/Range.idl
    [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] attribute DOMString innerHTML;
./core/dom/shadow/ShadowRoot.idl
    [MeasureAs=SelectionDeleteDromDocument, CustomElementCallbacks] void deleteFromDocument();
./core/editing/Selection.idl
    [Reflect] attribute DOMString target;
    [Reflect] attribute DOMString download;
    [Reflect] attribute DOMString ping;
    [Reflect] attribute DOMString rel;
    [Reflect] attribute DOMString hreflang;
    [Reflect] attribute DOMString type;
    [Reflect, ReflectOnly=("","no-referrer","origin","no-referrer-when-downgrade","origin-when-cross-origin","unsafe-url"), ReflectMissing="", ReflectInvalid=""] attribute DOMString referrerpolicy;
    [Reflect] attribute DOMString coords;
    [Reflect] attribute DOMString charset;
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString rev;
    [Reflect] attribute DOMString shape;
./core/html/HTMLAnchorElement.idl
    [Reflect] attribute DOMString alt;
    [Reflect] attribute DOMString coords;
    [Reflect] attribute DOMString shape;
    [Reflect] attribute DOMString target;
    [Reflect] attribute DOMString ping;
    [Reflect, ReflectOnly=("","no-referrer","origin","no-referrer-when-downgrade","origin-when-cross-origin","unsafe-url"), ReflectMissing="", ReflectInvalid=""] attribute DOMString referrerpolicy;
    [Reflect] attribute boolean noHref;
./core/html/HTMLAreaElement.idl
    [Reflect] attribute DOMString target;
./core/html/HTMLBaseElement.idl
    [Reflect, TreatNullAs=EmptyString] attribute DOMString text;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString link;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString vLink;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString aLink;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
    [Reflect] attribute DOMString background;
./core/html/HTMLBodyElement.idl
    [Reflect] attribute DOMString clear;
./core/html/HTMLBRElement.idl
    [Reflect] attribute boolean autofocus;
    [Reflect] attribute boolean disabled;
    [Reflect] attribute boolean formNoValidate;
    [Reflect] attribute DOMString formTarget;
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString value;
./core/html/HTMLButtonElement.idl
    [Reflect] attribute DOMString select;
./core/html/HTMLContentElement.idl
    [Reflect] attribute boolean open;
./core/html/HTMLDetailsElement.idl
    [Reflect] attribute boolean open;
./core/html/HTMLDialogElement.idl
    [Reflect] attribute boolean compact;
./core/html/HTMLDirectoryElement.idl
    [Reflect] attribute DOMString align;
./core/html/HTMLDivElement.idl
    [Reflect] attribute boolean compact;
./core/html/HTMLDListElement.idl
    [TreatNullAs=EmptyString, CustomElementCallbacks] attribute DOMString fgColor;
    [TreatNullAs=EmptyString, CustomElementCallbacks] attribute DOMString linkColor;
    [TreatNullAs=EmptyString, CustomElementCallbacks] attribute DOMString vlinkColor;
    [TreatNullAs=EmptyString, CustomElementCallbacks] attribute DOMString alinkColor;
    [TreatNullAs=EmptyString, CustomElementCallbacks] attribute DOMString bgColor;
./core/html/HTMLDocument.idl
    [Reflect] attribute DOMString title;
    [Reflect] attribute DOMString lang;
    [Reflect] attribute boolean hidden;
    [CustomElementCallbacks] attribute long tabIndex;
    [Reflect] attribute DOMString accessKey;
    [CustomElementCallbacks] attribute boolean draggable;
    [CustomElementCallbacks, RaisesException=Setter] attribute DOMString contentEditable;
    [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter, MeasureAs=HTMLElementInnerText] attribute DOMString innerText;
    [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter, MeasureAs=HTMLElementOuterText] attribute DOMString outerText;
    [Reflect, TreatNullAs=NullString, MeasureAs=PrefixedHTMLElementDropzone] attribute DOMString webkitdropzone;
./core/html/HTMLElement.idl
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString type;
    [Reflect] attribute DOMString width;
    [Reflect] attribute DOMString height;
    [Reflect] attribute DOMString align;
    [Reflect] attribute DOMString name;
./core/html/HTMLEmbedElement.idl
    [Reflect] attribute boolean disabled;
    [Reflect] attribute DOMString name;
./core/html/HTMLFieldSetElement.idl
    [Reflect, TreatNullAs=EmptyString] attribute DOMString color;
    [Reflect] attribute DOMString face;
    [Reflect] attribute DOMString size;
./core/html/HTMLFontElement.idl
    [Reflect=accept_charset] attribute DOMString acceptCharset;
    [Reflect, URL] attribute DOMString action;
    [Reflect, ReflectOnly=("on","off"), ReflectMissing="on", ReflectInvalid="on"] attribute DOMString autocomplete;
    [CustomElementCallbacks] attribute DOMString enctype;
    [CustomElementCallbacks] attribute DOMString encoding;
    [CustomElementCallbacks] attribute DOMString method;
    [Reflect] attribute DOMString name;
    [Reflect] attribute boolean noValidate;
    [Reflect] attribute DOMString target;
    [CustomElementCallbacks] void reset();
./core/html/HTMLFormElement.idl
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString scrolling;
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString frameBorder;
    [Reflect, URL] attribute DOMString longDesc;
    [Reflect] attribute boolean noResize;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString marginHeight;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString marginWidth;
./core/html/HTMLFrameElement.idl
    [Reflect] attribute DOMString cols;
    [Reflect] attribute DOMString rows;
./core/html/HTMLFrameSetElement.idl
    [Reflect] attribute DOMString align;
./core/html/HTMLHeadingElement.idl
    [Reflect] attribute DOMString align;
    [Reflect] attribute DOMString color;
    [Reflect] attribute boolean noShade;
    [Reflect] attribute DOMString size;
    [Reflect] attribute DOMString width;
./core/html/HTMLHRElement.idl
    [Reflect] attribute DOMString version;
./core/html/HTMLHtmlElement.idl
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString srcdoc;
    [Reflect] attribute DOMString name;
    [Reflect] attribute boolean allowFullscreen;
    [Reflect] attribute DOMString width;
    [Reflect] attribute DOMString height;
    [Reflect, ReflectOnly=("","no-referrer","origin","no-referrer-when-downgrade","origin-when-cross-origin","unsafe-url"), ReflectMissing="", ReflectInvalid=""] attribute DOMString referrerpolicy;
    [Reflect] attribute DOMString align;
    [Reflect] attribute DOMString scrolling;
    [Reflect] attribute DOMString frameBorder;
    [Reflect, URL] attribute DOMString longDesc;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString marginHeight;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString marginWidth;
./core/html/HTMLIFrameElement.idl
    [Reflect] attribute DOMString alt;
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString srcset;
    [Reflect] attribute DOMString sizes;
    [Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymous", ReflectInvalid="anonymous"] attribute DOMString? crossOrigin;
    [Reflect] attribute DOMString useMap;
    [Reflect] attribute boolean isMap;
    [Reflect, ReflectOnly=("","no-referrer","origin","no-referrer-when-downgrade","origin-when-cross-origin","unsafe-url"), ReflectMissing="", ReflectInvalid=""] attribute DOMString referrerpolicy;
    [Reflect] attribute DOMString name;
    [Reflect, URL] attribute DOMString lowsrc;
    [Reflect] attribute DOMString align;
    [Reflect] attribute long hspace;
    [Reflect] attribute long vspace;
    [Reflect, URL] attribute DOMString longDesc;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString border;
./core/html/HTMLImageElement.idl
    [Reflect] attribute DOMString accept;
    [Reflect] attribute DOMString alt;
    [Reflect] attribute DOMString autocomplete;
    [Reflect] attribute boolean autofocus;
    [Reflect=checked] attribute boolean defaultChecked;
    [Reflect] attribute DOMString dirName;
    [Reflect] attribute boolean disabled;
    [CustomElementCallbacks] attribute DOMString formEnctype;
    [CustomElementCallbacks] attribute DOMString formMethod;
    [Reflect] attribute boolean formNoValidate;
    [Reflect] attribute DOMString formTarget;
    [CustomElementCallbacks] attribute unsigned long height;
    [RuntimeEnabled=InputModeAttribute, Reflect] attribute DOMString inputMode;
    [Reflect] attribute DOMString max;
    [RaisesException=Setter, CustomElementCallbacks] attribute long maxLength;
    [Reflect] attribute DOMString min;
    [RaisesException=Setter, CustomElementCallbacks] attribute long minLength;
    [Reflect] attribute boolean multiple;
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString pattern;
    [Reflect] attribute DOMString placeholder;
    [Reflect] attribute boolean readOnly;
    [Reflect] attribute boolean required;
    [RaisesException=Setter, CustomElementCallbacks] attribute unsigned long size;
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString step;
    [CustomElementCallbacks] attribute DOMString type;
    [Reflect=value, CustomElementCallbacks] attribute DOMString defaultValue;
    [TreatNullAs=EmptyString, RaisesException=Setter, CustomElementCallbacks] attribute DOMString value;
    [RaisesException=Setter, CustomElementCallbacks] attribute Date? valueAsDate;
    [RaisesException=Setter, CustomElementCallbacks] attribute unrestricted double valueAsNumber;
    [CustomElementCallbacks] attribute unsigned long width;
    [RaisesException, CustomElementCallbacks] void stepUp(optional long n = 1);
    [RaisesException, CustomElementCallbacks] void stepDown(optional long n = 1);
    [Reflect] attribute DOMString align;
    [Reflect] attribute DOMString useMap;
    [RuntimeEnabled=MediaCapture, Reflect] attribute boolean capture;
    [Reflect, MeasureAs=PrefixedDirectoryAttribute] attribute boolean webkitdirectory;
    [Reflect, MeasureAs=IncrementalAttribute] attribute boolean incremental;
./core/html/HTMLInputElement.idl
    [Reflect] attribute boolean autofocus;
    [Reflect] attribute DOMString challenge;
    [Reflect] attribute boolean disabled;
    [Reflect, ReflectOnly="rsa", ReflectMissing="rsa"] attribute DOMString keytype;
    [Reflect] attribute DOMString name;
./core/html/HTMLKeygenElement.idl
    [Reflect=for] attribute DOMString htmlFor;
./core/html/HTMLLabelElement.idl
    [Reflect] attribute DOMString align;
./core/html/HTMLLegendElement.idl
    [Reflect] attribute long value;
    [Reflect] attribute DOMString type;
./core/html/HTMLLIElement.idl
    [Reflect, Measure] attribute boolean disabled;
    [Reflect, URL] attribute DOMString href;
    [Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymous", ReflectInvalid="anonymous"] attribute DOMString? crossOrigin;
    [Reflect] attribute DOMString rel;
    [Reflect] attribute DOMString media;
    [Reflect] attribute DOMString hreflang;
    [Reflect] attribute DOMString type;
    [Reflect, RuntimeEnabled=LinkPreload] attribute DOMString as;
    [Reflect] attribute DOMString charset;
    [Reflect] attribute DOMString rev;
    [Reflect] attribute DOMString target;
    [Reflect] attribute DOMString integrity;
    [Reflect, RuntimeEnabled=LinkServiceWorker] attribute USVString scope;
./core/html/HTMLLinkElement.idl
    [Reflect] attribute DOMString name;
./core/html/HTMLMapElement.idl
    [ImplementedInPrivateScript, Reflect] attribute DOMString behavior;
    [ImplementedInPrivateScript, Reflect] attribute DOMString bgColor;
    [ImplementedInPrivateScript, Reflect] attribute DOMString direction;
    [ImplementedInPrivateScript, Reflect] attribute DOMString height;
    [ImplementedInPrivateScript, Reflect] attribute unsigned long hspace;
    [ImplementedInPrivateScript, Reflect] attribute boolean trueSpeed;
    [ImplementedInPrivateScript, Reflect] attribute unsigned long vspace;
    [ImplementedInPrivateScript, Reflect] attribute DOMString width;
./core/html/HTMLMarqueeElement.idl
    [Reflect, URL] attribute DOMString src;
    [Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymous", ReflectInvalid="anonymous"] attribute DOMString? crossOrigin;
    [Reflect] attribute boolean autoplay;
    [Reflect] attribute boolean loop;
    [Reflect] attribute boolean controls;
    [Reflect=muted] attribute boolean defaultMuted;
./core/html/HTMLMediaElement.idl
    [RuntimeEnabled=ContextMenu, Reflect] attribute DOMString type;
    [RuntimeEnabled=ContextMenu, Reflect] attribute DOMString label;
    [Reflect] attribute boolean compact;
./core/html/HTMLMenuElement.idl
    [Reflect] attribute DOMString type;
    [Reflect] attribute DOMString label;
    [Reflect] attribute DOMString icon;
    [Reflect] attribute boolean disabled;
    [Reflect] attribute boolean checked;
    [Reflect] attribute DOMString radiogroup;
    [Reflect] attribute boolean default;
./core/html/HTMLMenuItemElement.idl
    [Reflect] attribute DOMString name;
    [Reflect=http_equiv] attribute DOMString httpEquiv;
    [Reflect] attribute DOMString content;
    [Reflect] attribute DOMString scheme;
./core/html/HTMLMetaElement.idl
    [Reflect, URL] attribute DOMString cite;
    [Reflect] attribute DOMString dateTime;
./core/html/HTMLModElement.idl
    [Reflect, URL] attribute DOMString data;
    [Reflect] attribute DOMString type;
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString useMap;
    [Reflect] attribute DOMString width;
    [Reflect] attribute DOMString height;
    [Reflect] attribute DOMString align;
    [Reflect] attribute DOMString archive;
    [Reflect] attribute DOMString code;
    [Reflect] attribute boolean declare;
    [Reflect] attribute long hspace;
    [Reflect] attribute DOMString standby;
    [Reflect] attribute long vspace;
    [Reflect, URL] attribute DOMString codeBase;
    [Reflect] attribute DOMString codeType;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString border;
./core/html/HTMLObjectElement.idl
    [Reflect] attribute boolean reversed;
    [Reflect] attribute DOMString type;
    [Reflect] attribute boolean compact;
./core/html/HTMLOListElement.idl
    [Reflect] attribute boolean disabled;
    [Reflect] attribute DOMString label;
./core/html/HTMLOptGroupElement.idl
    [Reflect] attribute boolean disabled;
    [Reflect=selected] attribute boolean defaultSelected;
./core/html/HTMLOptionElement.idl
    [Reflect] attribute DOMString name;
./core/html/HTMLOutputElement.idl
    [Reflect] attribute DOMString align;
./core/html/HTMLParagraphElement.idl
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString value;
    [Reflect] attribute DOMString type;
    [Reflect] attribute DOMString valueType;
./core/html/HTMLParamElement.idl
    [Reflect] attribute long width;
./core/html/HTMLPreElement.idl
    [Reflect, URL] attribute DOMString cite;
./core/html/HTMLQuoteElement.idl
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString type;
    [Reflect] attribute DOMString charset;
    [Reflect] attribute boolean defer;
    [Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymous", ReflectInvalid="anonymous"] attribute DOMString? crossOrigin;
    [Reflect] attribute DOMString event;
    [Reflect=for] attribute DOMString htmlFor;
    [Reflect, RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute DOMString nonce;
    [Reflect] attribute DOMString integrity;
./core/html/HTMLScriptElement.idl
    [Reflect] attribute boolean autofocus;
    [Reflect] attribute boolean disabled;
    [Reflect] attribute boolean multiple;
    [Reflect] attribute DOMString name;
    [Reflect] attribute boolean required;
./core/html/HTMLSelectElement.idl
    [Reflect] attribute DOMString name;
./core/html/HTMLSlotElement.idl
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString srcset;
    [Reflect] attribute DOMString sizes;
    [Reflect] attribute DOMString media;
./core/html/HTMLSourceElement.idl
    [Reflect] attribute DOMString media;
    [Reflect] attribute DOMString type;
./core/html/HTMLStyleElement.idl
    [Reflect] attribute DOMString align;
./core/html/HTMLTableCaptionElement.idl
    [Reflect, TreatNullAs=NullString] attribute DOMString headers;
    [Reflect] attribute DOMString align;
    [Reflect] attribute DOMString axis;
    [Reflect] attribute DOMString height;
    [Reflect] attribute DOMString width;
    [Reflect=char] attribute DOMString ch;
    [Reflect=charoff] attribute DOMString chOff;
    [Reflect] attribute boolean noWrap;
    [Reflect] attribute DOMString vAlign;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
    [Reflect] attribute DOMString abbr;
    [Reflect] attribute DOMString scope;
./core/html/HTMLTableCellElement.idl
    [Reflect] attribute DOMString align;
    [Reflect=char] attribute DOMString ch;
    [Reflect=charoff] attribute DOMString chOff;
    [Reflect] attribute DOMString vAlign;
    [Reflect] attribute DOMString width;
./core/html/HTMLTableColElement.idl
    [Reflect] attribute DOMString align;
    [Reflect] attribute DOMString border;
    [Reflect] attribute DOMString frame;
    [Reflect] attribute DOMString rules;
    [Reflect] attribute DOMString summary;
    [Reflect] attribute DOMString width;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString cellPadding;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString cellSpacing;
./core/html/HTMLTableElement.idl
    [Reflect] attribute DOMString align;
    [Reflect=char] attribute DOMString ch;
    [Reflect=charoff] attribute DOMString chOff;
    [Reflect] attribute DOMString vAlign;
    [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
./core/html/HTMLTableRowElement.idl
    [Reflect] attribute DOMString align;
    [Reflect=char] attribute DOMString ch;
    [Reflect=charoff] attribute DOMString chOff;
    [Reflect] attribute DOMString vAlign;
./core/html/HTMLTableSectionElement.idl
    [Reflect] attribute boolean autofocus;
    [Reflect] attribute DOMString dirName;
    [Reflect] attribute boolean disabled;
    [RuntimeEnabled=InputModeAttribute, Reflect] attribute DOMString inputMode;
    [Reflect] attribute DOMString name;
    [Reflect] attribute DOMString placeholder;
    [Reflect] attribute boolean readOnly;
    [Reflect] attribute boolean required;
    [Reflect] attribute DOMString wrap;
./core/html/HTMLTextAreaElement.idl
    [Reflect, URL] attribute DOMString src;
    [Reflect] attribute DOMString srclang;
    [Reflect] attribute DOMString label;
    [Reflect] attribute boolean default;
    // Reflect is used for ERROR because it conflicts with a windows define.
    [Reflect=TRACK_ERROR] const unsigned short ERROR = 3;
./core/html/HTMLTrackElement.idl
    [Reflect] attribute boolean compact;
    [Reflect] attribute DOMString type;
./core/html/HTMLUListElement.idl
    [Reflect] attribute unsigned long width;
    [Reflect] attribute unsigned long height;
    [Reflect, URL] attribute DOMString poster;
./core/html/HTMLVideoElement.idl
    [CustomElementCallbacks] attribute long tabIndex;
./core/svg/SVGElement.idl
    [Reflect] attribute DOMString type;
./core/svg/SVGScriptElement.idl
    [CustomElementCallbacks] DocumentFragment? transformToFragment(Node source, Document output);
    [CustomElementCallbacks] Document? transformToDocument(Node source);
./core/xml/XSLTProcessor.idl
    [Reflect] attribute boolean disableRemotePlayback;
./modules/remoteplayback/HTMLMediaElementRemotePlayback.idl

I've also noticed a few missing ones so far which I am tracking separately and will report on when I have a comprehensive list.

@domenic domenic removed their assignment Apr 18, 2016
domenic added a commit to whatwg/html that referenced this issue Apr 18, 2016
This executes a large portion of the plan laid out in
WICG/webcomponents#186, by introducing a new
[CEReactions] IDL extended attribute which can be used to indicate that
new steps should be inserted related to custom element reactions. It
replaces the previous handwaving of "every operation and attribute" with
an explicit annotation on every relevant operation, attribute, setter,
and deleter.

There remains work to do to annotate other specifications across the web
platform with this attribute (notably DOM), as well as deal with editing
operations. But all such updates will depend on the definition of
[CEReactions] contained here.
@domenic
Copy link
Collaborator

domenic commented Apr 18, 2016

OK, I went through HTML and found all the places that need to be annotated in whatwg/html#1069.

Looking at the above printout of Blink's IDL files, I see the following left on the hitlist:

Regarding SVG and MathML: we don't allow SVG/MathML elements to be custom, but I think they can still affect the world in interesting ways. For example, if there are setters that allow you to clear out the contents of an element (like the many .text setters in HTML), and someone inserted a custom HTML element inside a SVG/MathML element, then it should get its disconnectedCallback called.

@esprehn
Copy link

esprehn commented Apr 19, 2016

If we added [Reflect] then it could imply the delivery scope on the setter which would catch many of the random ones.

domenic added a commit to whatwg/html that referenced this issue Apr 19, 2016
This executes a large portion of the plan laid out in
WICG/webcomponents#186, by introducing a new
[CEReactions] IDL extended attribute which can be used to indicate that
new steps should be inserted related to custom element reactions. It
replaces the previous handwaving of "every operation and attribute" with
an explicit annotation on every relevant operation, attribute, setter,
and deleter.

There remains work to do to annotate other specifications across the web
platform with this attribute (notably DOM), as well as deal with editing
operations. But all such updates will depend on the definition of
[CEReactions] contained here.
domenic added a commit to whatwg/html that referenced this issue Apr 19, 2016
This executes a large portion of the plan laid out in
WICG/webcomponents#186, by introducing a new
[CEReactions] IDL extended attribute which can be used to indicate that
new steps should be inserted related to custom element reactions. It
replaces the previous handwaving of "every operation and attribute" with
an explicit annotation on every relevant operation, attribute, setter,
and deleter.

There remains work to do to annotate other specifications across the web
platform with this attribute (notably DOM), as well as deal with editing
operations. But all such updates will depend on the definition of
[CEReactions] contained here.
domenic added a commit to whatwg/html that referenced this issue Apr 19, 2016
This executes a large portion of the plan laid out in
WICG/webcomponents#186, by introducing a new
[CEReactions] IDL extended attribute which can be used to indicate that
new steps should be inserted related to custom element reactions. It
replaces the previous handwaving of "every operation and attribute" with
an explicit annotation on every relevant operation, attribute, setter,
and deleter.

There remains work to do to annotate other specifications across the web
platform with this attribute (notably DOM), as well as deal with editing
operations. But all such updates will depend on the definition of
[CEReactions] contained here.
annevk pushed a commit to whatwg/html that referenced this issue Apr 20, 2016
This executes a large portion of the plan laid out in WICG/webcomponents#186, by introducing a new [CEReactions] IDL extended attribute which can be used to indicate that new steps should be inserted related to custom element reactions. It replaces the previous handwaving of "every operation and attribute" with an explicit annotation on every relevant operation, attribute, setter, and deleter.

There remains work to do to annotate other specifications across the web platform with this attribute (notably DOM), as well as deal with editing operations. But all such updates will depend on the definition of [CEReactions] added here.
@domenic
Copy link
Collaborator

domenic commented Apr 20, 2016

@esprehn yeah, I plan to add [Reflect] later, which will in many cases supercede the need for [CEReactions]. But I didn't want to block this work on figuring out [Reflect] (which is fairly complicated).

domenic added a commit to whatwg/dom that referenced this issue Apr 20, 2016
Part of WICG/webcomponents#186, and using whatwg/html@27aa7bc. Depends on a fix for speced/bikeshed#677 to get proper linking to the definition of CEReactions.
domenic added a commit to domenic/DOM-Parsing that referenced this issue Apr 20, 2016
This is part of the effort in WICG/webcomponents#186 to annotate all parts of the platform that cause DOM mutations and thus need to set up state for custom element reactions. [CEReactions] is defined in https://html.spec.whatwg.org/multipage/scripting.html#cereactions.

Also normalizes whitespace to spaces instead of a mix of spaces and tabs.
domenic added a commit to domenic/mediacapture-main that referenced this issue Apr 20, 2016
Since the allowUserMedia attribute can change the DOM in ways that may impact custom elements, it needs to be annotated with the [CEReactions] attribute. This is part of the larger effort at WICG/webcomponents#186. [CEReactions] is defined in https://html.spec.whatwg.org/multipage/scripting.html#cereactions.
domenic added a commit to domenic/html-media-capture that referenced this issue Apr 20, 2016
Since the capture attribute can change the DOM in ways that may impact custom elements, it needs to be annotated with the [CEReactions] attribute. This is part of the larger effort at WICG/webcomponents#186. [CEReactions] is defined in https://html.spec.whatwg.org/multipage/scripting.html#cereactions.
domenic added a commit to domenic/DOM-Parsing that referenced this issue Apr 20, 2016
This is part of the effort in WICG/webcomponents#186 to annotate all parts of the platform that cause DOM mutations and thus need to set up state for custom element reactions. [CEReactions] is defined in https://html.spec.whatwg.org/multipage/scripting.html#cereactions.

Also normalizes whitespace to spaces instead of a mix of spaces and tabs.
domenic added a commit to domenic/remote-playback that referenced this issue Apr 20, 2016
Since the disableRemotePlayback attribute can change the DOM in ways that may impact custom elements, it needs to be annotated with the [CEReactions] attribute. This is part of the larger effort at WICG/webcomponents#186. [CEReactions] is defined in https://html.spec.whatwg.org/multipage/scripting.html#cereactions.
domenic added a commit to domenic/selection-api that referenced this issue Apr 20, 2016
Since the deleteFromDocument() method can change the DOM in ways that may impact custom elements, it needs to be annotated with the [CEReactions] attribute. This is part of the larger effort at WICG/webcomponents#186. [CEReactions] is defined in https://html.spec.whatwg.org/multipage/scripting.html#cereactions.
annevk pushed a commit to whatwg/dom that referenced this issue Apr 21, 2016
Part of WICG/webcomponents#186, and furthering whatwg/html@27aa7bc.

Linking [CEREactions] will happen once speced/bikeshed#677 is fixed.
@sideshowbarker
Copy link
Contributor

Is there any issue against the WebIDL spec for this yet?

@annevk
Copy link
Collaborator

annevk commented Apr 26, 2016

@sideshowbarker the current idea is to just define it in HTML directly. IDL might want to mention specifications can do that of course.

tabatkins added a commit to tabatkins/dom that referenced this issue Apr 28, 2016
* Add more legacy event types for createEvent()

Approximately as requested at
https://bugzilla.mozilla.org/show_bug.cgi?id=1251198#c7. This is the
list of events supported in createEvent() by at least two of Firefox,
Chrome, and IE 11. The one exception is I omitted MutationEvent,
which all three support, because apparently spec-land has decided to
deny its existence in the hope that it will go away.

Bikeshed does not know about all of the added interface names,
hopefully that will sort itself out over time.

* Meta: improve pull request instructions for DOM

See whatwg/fetch#276 for context.

* Enable an event listener to be invoked just once

* Editorial: web compatibility typically remains relevant

Fixes whatwg#210.

* Shadow: define attachShadow() for custom elements

* Meta: make it easier to reference participate in a tree

PR: whatwg#216

* Define node document for new Text nodes

Fixes whatwg#224 and part of whatwg#212. Also fix part of whatwg#209 by stating these
algorithms can rethrow exceptions.

* Use a single concept for attribute changes

This setup is still a little sketchy I think, but not more so than the
insertion and removing steps.

* SVGEvent is only Gecko, Blink also has SVGEvents

As pointed out by zcorpan in whatwg#227.

* Set createDocument()'s content type based on namespace

Fixes whatwg#217.

PR: whatwg#218

* Make document.createEvent("touchevent") sometimes throw

Browsers typically disable touch events on non-touch devices, and there exists web content that detects this difference using document.createEvent().

Fixes whatwg#227.

* Shadow: define slotchange event

Shadow: define slotchange event

Fixes WICG/webcomponents#288.

This defines the slotchange event in response to remove/insert operations, changes to a slot’s name attribute, and changes to an element’s slot attribute.

This also introduces the assigned nodes concept for slots, and assigned slot concept for slotables.

Slotables now also have a name, rather than a “get name”.

The slotchange event dispatches just after mutation observers have their callbacks invoked. The slotchange event is not yet marked scoped as scoped events are not yet defined in the DOM Standard.

Note: although the original issue did not mention it, this also suppresses signaling when slots are removed from a tree. Not just when they are inserted.

* Editorial: update custom element cross-spec references

* Editorial: fix a few cross-linking missteps

* Editorial: make "is" and "prefix" optional in "create an element"

* Use "create an element" in createHTMLDocument

Takes care of part of whatwg#212.

* Editorial: align exception language with IDL

* Editorial: introduce more shadow-including terms for CSS

Fixes whatwg#225.

* Editorial: distributed -> flattened

* Meta: export more terms

Fixes whatwg#233.

* Editorial: add "shadow host" and "assigned" as terms

This makes a couple of non-null checks read better and enshrines a term
we had already been using.

* Editorial: flip non-null/otherwise conditions

PR: whatwg#234

* Shadow: <slot> is now defined in HTML

* Remove passive as event listener key

This changes makes passive no longer contribute to the uniqueness of
an event listener. It therefore also no longer needs to be supported
as part of removeEventListener().

Fixes WICG/EventListenerOptions#27.

PR: whatwg#236

* Meta: point out event's timeStamp is likely to change

See whatwg#23 for details.

* Add [CEReactions] annotations to mutating methods

Part of WICG/webcomponents#186, and furthering whatwg/html@27aa7bc.

Linking [CEREactions] will happen once speced/bikeshed#677 is fixed.

* Editorial: check stop propagation flag at start of invoke

* Editorial: deduplicate Veli Şenol

* Editorial: define defaults for EventListenerOptions

Although this is also done in prose, this nonetheless simplifies the
prose a bit and makes it clearer to those skimming the standard what is
going on (although skimming is not recommended).

Fixes whatwg#239.

* Meta: link to Japanese translation

See
triple-underscore/triple-underscore.github.io#1
for more details.
igrigorik added a commit to w3c/preload that referenced this issue Apr 29, 2016
Since the as attribute can change the DOM in ways that may impact custom
elements, it needs to be annotated with the [CEReactions] attribute.
This is part of the larger effort at WICG/webcomponents#186.
[CEReactions] is defined in
https://html.spec.whatwg.org/multipage/scripting.html#cereactions.

Credit to @domenic.

Closes #63
domenic added a commit to whatwg/html that referenced this issue Jun 9, 2016
As discussed in WICG/webcomponents#186, there
are certain scenarios where custom element reactions could be enqueued,
but the custom element reactions stack is empty. The most prominent of
these is editing operations.

We solve this issue in two parts:

- First, introduce the backup element queue (similar to the old "base
element queue" concept; see
WICG/webcomponents#457). This takes care of
cases like editing which cannot be solved in any other way.
- Also, we mandate that [CEReactions] be applied to nonstandard APIs
that modify the DOM, including a list of what we've identified so far.

Closes WICG/webcomponents#186.
domenic added a commit to whatwg/html that referenced this issue Jun 29, 2016
As discussed in WICG/webcomponents#186, there
are certain scenarios where custom element reactions could be enqueued,
but the custom element reactions stack is empty. The most prominent of
these is editing operations.

We solve this issue in two parts:

- First, introduce the backup element queue (similar to the old "base
element queue" concept; see
WICG/webcomponents#457). This takes care of
cases like editing which cannot be solved in any other way.
- Also, we mandate that [CEReactions] be applied to nonstandard APIs
that modify the DOM, including a list of what we've identified so far.

Closes WICG/webcomponents#186.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants