2016-07-25 00:38:00 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
// https://html.spec.whatwg.org/#dom-window-customelements
|
2016-10-12 10:26:02 +03:00
|
|
|
interface CustomElementRegistry {
|
2017-03-30 13:58:48 +03:00
|
|
|
[CEReactions, Throws]
|
2016-07-25 00:38:00 +03:00
|
|
|
void define(DOMString name, Function functionConstructor,
|
|
|
|
optional ElementDefinitionOptions options);
|
2018-05-11 21:23:31 +03:00
|
|
|
[ChromeOnly, Throws]
|
|
|
|
void setElementCreationCallback(DOMString name, CustomElementCreationCallback callback);
|
2016-07-25 00:38:00 +03:00
|
|
|
any get(DOMString name);
|
|
|
|
[Throws]
|
|
|
|
Promise<void> whenDefined(DOMString name);
|
2018-06-20 02:06:33 +03:00
|
|
|
[CEReactions] void upgrade(Node root);
|
2016-07-25 00:38:00 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary ElementDefinitionOptions {
|
|
|
|
DOMString extends;
|
|
|
|
};
|
|
|
|
|
2018-05-11 21:23:31 +03:00
|
|
|
callback CustomElementCreationCallback = void (DOMString name);
|