-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcustom-element.d.ts
40 lines (39 loc) · 1.66 KB
/
custom-element.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
export function log(x: any): void;
export function deepEqual(a: any, b:any): boolean|0;
export function xml2dom(xmlString:string): Document;
export function xmlString(doc:Node|Document): string;
export function obj2node(o:any, tag:string, doc:Document): HTMLElement;
export function tagUid(node:HTMLElement): HTMLElement;
/**
* @summary Declarative Custom Element as W3C proposal PoC with native(XSLT) based templating
* ```html
* <custom-element tag="my-element">
* <template>
* <attribute name="p1" >default_P1</attribute>
* <style>
* color:green;
* b{ color: blue;}
* input:checked+b{ color: darkblue; text-shadow: 0 0 4px springgreen;}
* </style>
* <label>
* green
* <input type="checkbox" value="Glowing Blue" checked/><b>blue</b>
* </label>
* p1:{$p1}
* </template>
* </custom-element>
* <my-element p1="abc"></my-element>
* ```
*
* @extends HTMLElement
* @tag custom-element
* @tag-name custom-element
* @attr {boolean} hidden - hides DCE definition to prevent visual appearance of content. Wrap the payload into template tag to prevent applying the inline CSS in global scope.
* @attr {string} tag - HTML tag for Custom Element. Used for window.customElements.define(). If not set, would be generated and DCE instance rendered inline.
* @attr {string} src - full, relative, or hash URL to DCE template.
*
*/
export class CustomElement extends HTMLElement {
static observedAttributes : string[];
}
export default CustomElement;