mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add webcomponents.js 0.6.0 typings
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/// <reference path="webcomponents.js.d.ts" />
|
||||
|
||||
/*
|
||||
* Custom Elements
|
||||
*/
|
||||
var fooProto = Object.create(HTMLElement.prototype, {
|
||||
createdCallback() {
|
||||
// `this` should be the created element
|
||||
this.getElementsByTagName("a");
|
||||
}
|
||||
});
|
||||
|
||||
document.registerElement("x-foo", {
|
||||
prototype: fooProto
|
||||
});
|
||||
|
||||
window.CustomElements.hasNative;
|
||||
window.CustomElements.flags;
|
||||
window.CustomElements.ready;
|
||||
window.CustomElements.useNative;
|
||||
|
||||
/*
|
||||
* HTMLImports
|
||||
*/
|
||||
|
||||
window.HTMLImports.isIE;
|
||||
window.HTMLImports.rootDocument.querySelectorAll("div");
|
||||
window.HTMLImports.useNative;
|
||||
window.HTMLImports.whenReady(() => {
|
||||
return window.HTMLImports.ready === true;
|
||||
});
|
||||
|
||||
document.querySelectorAll(`link[type=${window.HTMLImports.IMPORT_LINK_TYPE}`);
|
||||
|
||||
/*
|
||||
* Web Components
|
||||
*/
|
||||
window.WebComponents.flags;
|
||||
|
||||
Reference in New Issue
Block a user