From e2257be62696a9c8219d9a90268c61f0214d35fb Mon Sep 17 00:00:00 2001 From: suns Date: Mon, 14 Feb 2022 23:04:16 -0800 Subject: [PATCH 1/8] ast-parse.js renders HTMLElementMixin.d.ts, incomplete --- ToDo.md | 1 + coverage/coverage.svg | 10 - coverage/lcov-report/ApiChain.js.html | 290 ------ coverage/lcov-report/CssChain.js.html | 803 ---------------- coverage/lcov-report/CssChainElement.js.html | 182 ---- coverage/lcov-report/base.css | 224 ----- coverage/lcov-report/block-navigation.js | 79 -- .../lcov-report/css-chain-element.js.html | 95 -- coverage/lcov-report/favicon.png | Bin 540 -> 0 bytes coverage/lcov-report/index.html | 186 ---- coverage/lcov-report/prettify.css | 1 - coverage/lcov-report/prettify.js | 2 - coverage/lcov-report/slots-in-shadow.js.html | 203 ---- .../lcov-report/slots-light-vs-shadow.js.html | 407 -------- coverage/lcov-report/sort-arrow-sprite.png | Bin 209 -> 0 bytes coverage/lcov-report/sorter.js | 170 ---- coverage/lcov.info | 908 ------------------ dist/ApiChain.js | 2 - dist/ApiChain.js.map | 7 - dist/CssChain.js | 2 - dist/CssChain.js.map | 7 - dist/CssChainElement.js | 6 - dist/CssChainElement.js.map | 7 - dist/PokeApi-Explorer.js | 19 - dist/PokeApi-Explorer.js.map | 7 - dist/css-chain-element.js | 2 - dist/css-chain-element.js.map | 7 - dist/demo.html | 55 -- dist/slots-in-shadow.js | 29 - dist/slots-in-shadow.js.map | 7 - dist/slots-light-vs-shadow.js | 2 - dist/slots-light-vs-shadow.js.map | 7 - package-lock.json | 22 +- package.json | 5 +- src/CssChainElement.js | 2 +- src/PokeApi-Explorer.js | 6 +- src/slots-light-vs-shadow.html | 48 +- src/slots.html | 4 +- test/CssChain-methods.test.js | 24 +- test/CssChain-slots.test.js | 4 +- test/CssChain-template.test.js | 6 +- test/CssChain-types.test.ts | 21 + types/ast-parse.js | 51 +- 43 files changed, 117 insertions(+), 3803 deletions(-) delete mode 100644 coverage/coverage.svg delete mode 100644 coverage/lcov-report/ApiChain.js.html delete mode 100644 coverage/lcov-report/CssChain.js.html delete mode 100644 coverage/lcov-report/CssChainElement.js.html delete mode 100644 coverage/lcov-report/base.css delete mode 100644 coverage/lcov-report/block-navigation.js delete mode 100644 coverage/lcov-report/css-chain-element.js.html delete mode 100644 coverage/lcov-report/favicon.png delete mode 100644 coverage/lcov-report/index.html delete mode 100644 coverage/lcov-report/prettify.css delete mode 100644 coverage/lcov-report/prettify.js delete mode 100644 coverage/lcov-report/slots-in-shadow.js.html delete mode 100644 coverage/lcov-report/slots-light-vs-shadow.js.html delete mode 100644 coverage/lcov-report/sort-arrow-sprite.png delete mode 100644 coverage/lcov-report/sorter.js delete mode 100644 coverage/lcov.info delete mode 100644 dist/ApiChain.js delete mode 100644 dist/ApiChain.js.map delete mode 100644 dist/CssChain.js delete mode 100644 dist/CssChain.js.map delete mode 100644 dist/CssChainElement.js delete mode 100644 dist/CssChainElement.js.map delete mode 100644 dist/PokeApi-Explorer.js delete mode 100644 dist/PokeApi-Explorer.js.map delete mode 100644 dist/css-chain-element.js delete mode 100644 dist/css-chain-element.js.map delete mode 100644 dist/demo.html delete mode 100644 dist/slots-in-shadow.js delete mode 100644 dist/slots-in-shadow.js.map delete mode 100644 dist/slots-light-vs-shadow.js delete mode 100644 dist/slots-light-vs-shadow.js.map diff --git a/ToDo.md b/ToDo.md index 4bf3b84..907c8b5 100644 --- a/ToDo.md +++ b/ToDo.md @@ -1 +1,2 @@ prop( k, v, css ) - add css support +dist/*.html not all functional diff --git a/coverage/coverage.svg b/coverage/coverage.svg deleted file mode 100644 index 633eecd..0000000 --- a/coverage/coverage.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - coverage - 100% - diff --git a/coverage/lcov-report/ApiChain.js.html b/coverage/lcov-report/ApiChain.js.html deleted file mode 100644 index 99e4381..0000000 --- a/coverage/lcov-report/ApiChain.js.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - Code coverage report for ApiChain.js - - - - - - - - - -
-
-

All files ApiChain.js

-
- -
- 100% - Statements - 70/70 -
- - -
- 100% - Branches - 11/11 -
- - -
- 100% - Functions - 6/6 -
- - -
- 100% - Lines - 70/70 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
-

-
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 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -717x -7x -7x -7x -7x -7x -7x -7x -4x -4x -4x -4x -4x -7x -7x -7x -7x -4x -4x -4x -7x -7x -7x -7x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -7x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -7x - 
const Prototype2ApiChain = new Map();
-const OBJ_prototype = Object.getPrototypeOf( {} );
- 
-    export const
-setProp = ( refObj, k, ApiChainLocal )=>
-{
-    if( typeof refObj[ k ] == 'function' )
-    {   ApiChainLocal.prototype[ k ] = function( ...args )
-        {   if( k.startsWith('get') )
-                return this.length ? this[0][k](...args) : undefined;
-            this.forEach( el => el[ k ]( ...args ) );
-            return this;
-        }
-    }else
-    {   Object.defineProperty( ApiChainLocal.prototype, k,
-        {   get  : function(){ return this.length ? this[ 0 ][ k ] : undefined }
-        ,   set: function( v )
-            {  this.forEach( el => el[ k ] = v );
-               return v
-            }
-        } );
-    }
-}
-    function
-applyPrototype( elementProto, refObj )
-{   let ChainClass = Prototype2ApiChain.get(elementProto);
-    if( ChainClass )
-        return ChainClass;
- 
-    class ApiChainLocal extends Array{}
- 
-    const applied = {"constructor":1};
-    for ( let obj=refObj; obj !== OBJ_prototype && obj != null ; obj = Object.getPrototypeOf(obj))
-    {
-        for( let k of Object.getOwnPropertyNames(obj) )
-            if( !applied[k])
-            {   setProp( refObj, k, ApiChainLocal );
-                applied[k]=1;
-            }
-    }
-    Prototype2ApiChain.set(elementProto, ApiChainLocal);
-    return ApiChainLocal;
-}
-    export function
-ApiChain( elOrArr, elementProto = undefined )
-{
-    const isArr = Array.isArray( elOrArr );
-    const arr =  isArr ? elOrArr : [ elOrArr ];
-    if( ! elementProto )
-        elementProto = Object.getPrototypeOf( isArr ? elOrArr[0] : elOrArr );
-    const refObj = arr[0];
-    if( elementProto === OBJ_prototype )
-    {
-        class ApiChainLocal extends Array{}
- 
-        for( let k in refObj )
-            setProp( refObj, k, ApiChainLocal );
-        const ret = new ApiChainLocal();
-        ret.push(...arr);
-        return ret;
-    }
- 
-    // class object
-    const ApiChain = applyPrototype( elementProto, refObj );
- 
-    const ret = new ApiChain();
-    ret.push(...arr);
-    return ret;
-}
-export default ApiChain;
- 
- -
-
- - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/CssChain.js.html b/coverage/lcov-report/CssChain.js.html deleted file mode 100644 index b5dec69..0000000 --- a/coverage/lcov-report/CssChain.js.html +++ /dev/null @@ -1,803 +0,0 @@ - - - - - - Code coverage report for CssChain.js - - - - - - - - - -
-
-

All files CssChain.js

-
- -
- 100% - Statements - 241/241 -
- - -
- 100% - Branches - 161/161 -
- - -
- 100% - Functions - 62/62 -
- - -
- 100% - Lines - 241/241 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
-

-
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 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -2426x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -5x -6x -6x -6x -6x -6x -5x -5x -6x -6x -6x -6x -6x -6x -4x -4x -6x -6x -6x -5x -5x -6x -6x -6x -4x -4x -4x -4x -4x -3x -3x -3x -4x -4x -6x -6x -6x -5x -5x -4x -4x -4x -5x -5x -2x -2x -5x -5x -5x -5x -5x -5x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -2x -2x -2x -1x -1x -2x -2x -2x -6x -6x -6x -2x -2x -2x -2x -6x -6x -4x -4x -2x -2x -2x -2x -4x -4x -4x -1x -1x -4x -4x -6x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -1x -1x -1x -1x -1x -1x -1x -6x -6x -6x -5x -5x -5x -3x -3x -5x -5x -5x -6x -6x -6x -6x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -2x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -6x -1x -6x -6x -6x -6x -6x -6x -6x - 
import { setProp } from './ApiChain.js';
-export const map = (arr, ...args ) => Array.prototype.map.apply( arr, args );
-export const csv = (arr, ...args ) => map( arr, ...args ).join(',');
- 
-export const collectionText = arr=> map(arr, e=>getNodeText(e)).join('')
- 
-const nop = ()=>''
-,   isArr = a => Array.isArray(a)
-,   isT = (a,t) => typeof a === t
-,   isStr  = a => isT(a, 'string')
-,   isNum  = a => isT(a, 'number')
-,   isFn   = a => isT(a, 'function')
-,   isNode = n => n && n.nodeType
-,   inWC   = n => n.getRootNode().host
-,   hasAssigned = n=> inWC(n) && n.assignedNodes
-,   each = (arr, cb )=> (arr.forEach(cb),arr)
-,   clear = n => hasAssigned(n)
-               ? n.assignedNodes().forEach( a => a.remove() )
-               : n.innerHTML='' ;
- 
-const node2text =   {   1:  n=>n.assignedNodes
-                             ? collectionText(n.assignedNodes()) || collectionText(n.childNodes)
-                             : [ 'SCRIPT','AUDIO','STYLE','CANVAS','DATALIST','EMBED','OBJECT'
-                               , 'PICTURE','IFRAME','METER','NOSCRIPT'
-                               , 'SELECT','OPTGROUP','PROGRESS','TEMPLATE','VIDEO'
-                               ].includes(n.nodeName)? '' : n.innerText //collectionText(n.children)
-                    ,   3: n=>n.nodeValue
-                    ,   11:n=>collectionText(n.childNodes)
-                    };
-export const getNodeText = n => (node2text[n.nodeType] || nop)(n);
-export const setNodeText = ( n, val ) =>
-    hasAssigned(n)
-    ? n.assignedElements().forEach( e => e.innerText = val )
-    : n.innerText = val;
-export const assignParent = (arr,n)=>arr.map( e=>n.appendChild(e))
-export const collectionHtml = arr => map( arr, n=>n.assignedElements
-         ? map( n.assignedElements(), e=>e.outerHTML ).join('')
-         : n.innerHTML
-    ).join('');
- 
-export const html2NodeArr = html =>
-{   const n = document.createElement('div');
-    n.innerHTML = html;
-    const wrapIfText = e=>{
-        if( e.nodeType !== 3 )
-            return e;
-        const n = document.createElement('span');
-        n.append(e);
-        return n;
-    };
-    return [...n.childNodes].map(e=>(e.remove(),e)).map(wrapIfText);
-};
- 
-export const addNodeHtml = ( n, val ) =>
-{
-    const set = ( to, v )=> ( v instanceof Node
-                            ? v.remove() || to.append(v)
-                            : html2NodeArr(v).forEach( e=>to.append(e) )
-                            )
-    ,  append = v => hasAssigned(n)
-                   ? n.assign( ...n.assignedNodes()
-                             , ...assignParent( each( html2NodeArr(v), e=>e.slot=n.name )
-                                                , n.getRootNode().host ) )
-                   : set(n,v);
- 
-    val instanceof NodeList || isArr(val)
-        ? [ ...val ].forEach( append )
-        : append(val);
-}
-export const setNodeHtml = ( n, val ) => { clear(n); addNodeHtml(n,val) };
- 
-    class
-CssChainLocal extends Array
-{
-    attr(...args){  return args.length>1 ? (( args[2] ? this.$(args[2]) : this ).setAttribute(...args),this) : this.getAttribute(...args) }
-    prop(...args){  return args.length>1 ? (( args[2] ? this.$(args[2]) : this ).forEach( el=>el[args[0]]=args[1]),this ): this[0][args[0]] }
-    forEach( ...args){ Array.prototype.forEach.apply(this,args); return this }
-    map( ...args){ return map(this,...args) }
-    push(...args){ Array.prototype.push.apply(this,args); return this; }
-    querySelector(css){ return new CssChainLocal().push( this.querySelectorAll(css)[0] )  }
-    querySelectorAll(css){ return this.reduce( ($,el)=> $.push(...(el.shadowRoot||el).querySelectorAll(css) ), new CssChainLocal()) }
-    $(...args){ return args.length ? this.querySelectorAll(...args) : this; }
-    parent(css)
-    {   const s = new Set()
-        , add = n=> s.has(n) ? 0 : (s.add(n), n)
-        , parentLoop = n=>  {   while( n=n.parentElement )
-                                    if( n.matches(css) )
-                                        return add(n);
-                            };
-        return CssChain(this.map( css ? parentLoop : n=>add(n.parentElement) ).filter(n=>n));
-    }
-    on(...args){ return this.addEventListener(...args) }
-    append(val){ return this.forEach( n=> addNodeHtml(n,val)) }
-    remove(...args)
-    {   if( !args.length )
-            {   this.forEach(el=>el.remove()); return new CssChainLocal() }
-        return isFn(args[1]) ? this.removeEventListener(...args) : this.map(el=>el.matches(args[0])).filter(el=>el) ;
-    }
-    clear(){ return this.forEach(n=>clear(n)) }
-    slot(...arr)
-    {   const ret = this.map( n=>n.shadowRoot || n ).$( arr.length
-                        ? csv( arr[0].split(',')
-                            , n=> ['""',"''"].includes(n) || !n
-                                  ? `slot:not([name])`
-                                  : `slot[name="${n}"]`
-                            )
-                        : 'slot');
-        if( arr.length === 2 )
-        {   ret.html( arr[ 1 ] );
-            return this
-        }
-        return ret;
-    }
-    template(n)
-    {
-        if( n === undefined )
-        {   const x  = this.$('[slot]').forEach(n=>n.remove());
-            n = this.splice(0, this.length );
-            this.push(document.createElement('span'));
-            this.append(x);
-        }else if( isStr(n) )
-        {
-            n = this.$( n );
-            n.remove();
-        }
-        const c = CssChain(n.content||n).clone(this);
-        c.slot().forEach( s =>
-        {   const v = this.children.filter( n=>n.slot===s.name );
-            v.length && setNodeHtml(s,v)
-        });
-        this.children.remove();
-        this.forEach( (n,i)=> n.appendChild(c[i]))
-        return this;
-    }
-    get innerText(){ return this.text() }
-    set innerText( val ){ return this.text( val ) }
-    text( val, css=undefined )
-    {   const arr = css? this.$(css): this;
-        if( val === undefined )
-            return collectionText( arr );
-        arr.forEach( isFn(val)
-                    ? (n,i)=>setNodeText(n,val(n,i,arr))
-                    : n=>setNodeText(n,val) );
-        return this
-    }
-    get outerHTML(){ return this.map( e=>e.outerHTML ).join('') }
-    set outerHTML( val )
-    {   return this.forEach( (n,i,arr)=>
-        {   const p = n.parentNode;
-            html2NodeArr(isFn(val) ? val(n,i,arr): val )
-                .forEach( e=> p.insertBefore( (arr[i]=e), n));
-            n.remove();
-        })
-    }
-    get innerHTML(){ return this.html() }
-    set innerHTML( val ){ return this.html(val) }
-    html( val, css=undefined )
-    {   const arr = css? this.$(css): this;
-        if( val === undefined )
-            return collectionHtml( arr );
-        arr.forEach( isFn(val)
-               ? (n,i)=>setNodeHtml(n,val(n,i,arr))
-               : n=>setNodeHtml(n,val) );
-        return this
-    }
-    assignedElements(){ return CssChain([].concat( ...this.map( el=>el.assignedElements ? el.assignedElements():[] ) ) ) }
-    assignedNodes(f){ return CssChain([].concat( ...this.map( el=>el.assignedNodes ? el.assignedNodes(f):[] ) ) ) }
-    cloneNode(...args){ return this.map( el=>el.cloneNode && el.cloneNode(...args) ) }
-    clone( /* number|array */count=1, cb=undefined )
-    {
-        let arr = count;
-        if( isNum(count) )
-            arr = Array.from({length: count}, (v, i) => i);
- 
-        if( isArr(arr) )
-        {   const ret = [];
-            this.forEach( n => arr.forEach( (d,i) =>
-            {   const m = n.ownerDocument.importNode(n,true)
-                ,     x = cb && cb( m, d, i, arr );
-                isStr(x)
-                ? ret.push( ...html2NodeArr(x) )
-                : isArr(x)
-                    ? ret.push(...x)
-                    : ret.push( isNode(x) ? x : m )
-            }));
-            return CssChain( ret );
-        }
-        const doc = count;
-        return this.map( el=> doc? doc.importNode( el,true ): el.cloneNode ? el.cloneNode(true):Object.assign({},el) )
-    }
-    get firstElementChild(){ return CssChain(this.map( n=>n.firstElementChild).filter(n=>n)) }
-    get firstChild(){ return CssChain(this.map( n=>n.firstChild).filter(n=>n)) }
-    get childNodes(){ return CssChain([].concat( ...map( this, el=>[...(el.childNodes || [] )] ) ) ) }
-    get children(){ return CssChain([].concat( ...map( this, el=>[...(el.children || [] )] ) ) ) }
-}
- 
-const appliedTypes = new Set()
-,     OBJ_prototype = Object.getPrototypeOf( {} );
- 
-    export function
-applyPrototype( nodeOrTag, ApiChain )
-{   const node = isStr(nodeOrTag) ? document.createElement(nodeOrTag) : nodeOrTag;
-    if( appliedTypes.has(node.tagName) )
-        return;
-    appliedTypes.add( node.tagName );
- 
-    for( let k in node )
-        if( !( k in ApiChain.prototype ) )
-            setProp( node, k, ApiChain );
- 
-    for ( let proto; (proto= Object.getPrototypeOf(node)) !== OBJ_prototype && proto != null && !appliedTypes.has(proto)  ; )
-    {   appliedTypes.add(proto);
-        for( let k of Object.getOwnPropertyNames(proto) )
-            if( !( k in ApiChain.prototype ) )
-                setProp( node, k, ApiChain );
-    }
-}
-Object.getOwnPropertyNames(window)
-    .filter(key => key.startsWith('HTML') && key.endsWith('Element')&& key.length > 11 )
-    .map( key=>key.substring(4,key.length-7).toLowerCase() )
-    .forEach( tag=>applyPrototype( document.createElement(tag), CssChainLocal ) );
- 
-    export function
-CssChain( css, el=document, protoArr=[] )
-{
-    const arr = 'string'===typeof css
-                ? el.querySelectorAll( css )
-                : isArr(css) ? css : [css? css.shadowRoot || css : document];
- 
-    if( isArr( protoArr ) )
-    {   if( !protoArr.length )
-            protoArr = [...arr].slice(0,256);
-    }else
-        protoArr = [ protoArr ];
- 
-    protoArr.forEach( el => applyPrototype(el,CssChainLocal) );
-    const ret = new CssChainLocal();
-    ret.push(...arr);
-    return ret;
-}
-export default CssChain;
- 
- -
-
- - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/CssChainElement.js.html b/coverage/lcov-report/CssChainElement.js.html deleted file mode 100644 index dcfd421..0000000 --- a/coverage/lcov-report/CssChainElement.js.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - Code coverage report for CssChainElement.js - - - - - - - - - -
-
-

All files CssChainElement.js

-
- -
- 100% - Statements - 34/34 -
- - -
- 100% - Branches - 6/6 -
- - -
- 100% - Functions - 4/4 -
- - -
- 100% - Lines - 34/34 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
-

-
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 -351x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x - 
import $ from './CssChain.js';
- 
-    export class
-CssChainElement extends HTMLElement
-{
-    constructor()
-    {
-        super();
-        this.title = 'Hey there';
-        this.counter = 0;
- 
-        const t = document.createElement('div');
-        t.innerHTML = this.template;
- 
-        this.attachShadow({mode: 'open'}).appendChild(t);
-        this.$('button').addEventListener('click', ()=>this.__increment() );
-    }
- 
-    get template()
-    {   return `
-<slot></slot> &bull;
-<b></b><br/>
-<input /><button>🛒</button>
-`
-    }
- 
-    $( ...arr ){ return $( this.shadowRoot ).$(...arr); }
- 
-    __increment()
-    {   const slotContent = this.$().slot().text();
-        this.$('b').innerHTML += `<span>${ slotContent }</span>`;
-        this.counter = this.$('input').value = this.$('span').length;
-    }
-}
- 
- -
-
- - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css deleted file mode 100644 index f418035..0000000 --- a/coverage/lcov-report/base.css +++ /dev/null @@ -1,224 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* yellow */ -.cbranch-no { background: yellow !important; color: #111; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -.highlighted, -.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ - background: #C21F39 !important; -} -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } -/* dark yellow (gold) */ -.status-line.medium, .medium .cover-fill { background: #f9cd0b; } -.medium .chart { border:1px solid #f9cd0b; } -/* light yellow */ -.medium { background: #fff4c2; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - -span.cline-neutral { background: #eaeaea; } - -.coverage-summary td.empty { - opacity: .5; - padding-top: 4px; - padding-bottom: 4px; - line-height: 1; - color: #888; -} - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js deleted file mode 100644 index c7ff5a5..0000000 --- a/coverage/lcov-report/block-navigation.js +++ /dev/null @@ -1,79 +0,0 @@ -/* eslint-disable */ -var jumpToCode = (function init() { - // Classes of code we would like to highlight in the file view - var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; - - // Elements to highlight in the file listing view - var fileListingElements = ['td.pct.low']; - - // We don't want to select elements that are direct descendants of another match - var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` - - // Selecter that finds elements on the page to which we can jump - var selector = - fileListingElements.join(', ') + - ', ' + - notSelector + - missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` - - // The NodeList of matching elements - var missingCoverageElements = document.querySelectorAll(selector); - - var currentIndex; - - function toggleClass(index) { - missingCoverageElements - .item(currentIndex) - .classList.remove('highlighted'); - missingCoverageElements.item(index).classList.add('highlighted'); - } - - function makeCurrent(index) { - toggleClass(index); - currentIndex = index; - missingCoverageElements.item(index).scrollIntoView({ - behavior: 'smooth', - block: 'center', - inline: 'center' - }); - } - - function goToPrevious() { - var nextIndex = 0; - if (typeof currentIndex !== 'number' || currentIndex === 0) { - nextIndex = missingCoverageElements.length - 1; - } else if (missingCoverageElements.length > 1) { - nextIndex = currentIndex - 1; - } - - makeCurrent(nextIndex); - } - - function goToNext() { - var nextIndex = 0; - - if ( - typeof currentIndex === 'number' && - currentIndex < missingCoverageElements.length - 1 - ) { - nextIndex = currentIndex + 1; - } - - makeCurrent(nextIndex); - } - - return function jump(event) { - switch (event.which) { - case 78: // n - case 74: // j - goToNext(); - break; - case 66: // b - case 75: // k - case 80: // p - goToPrevious(); - break; - } - }; -})(); -window.addEventListener('keydown', jumpToCode); diff --git a/coverage/lcov-report/css-chain-element.js.html b/coverage/lcov-report/css-chain-element.js.html deleted file mode 100644 index 2c68eb4..0000000 --- a/coverage/lcov-report/css-chain-element.js.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Code coverage report for css-chain-element.js - - - - - - - - - -
-
-

All files css-chain-element.js

-
- -
- 100% - Statements - 5/5 -
- - -
- 100% - Branches - 1/1 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 5/5 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
-

-
1 -2 -3 -4 -5 -61x -1x -1x -1x -1x - 
import { CssChainElement } from './CssChainElement.js';
- 
-window.customElements.define( 'css-chain', CssChainElement);
- 
-export default CssChainElement;
- 
- -
-
- - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/favicon.png b/coverage/lcov-report/favicon.png deleted file mode 100644 index 6691817834a957c938e7f09640a37a645fb31457..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmV+%0^|LOP)wSzy{h>9elhJ=8GnBQmf?)AI(^#wDA_`!QTxaXXE&bjxo zTGCc%V|W`}Lwz0rDO*qBbGY-M@aNENIZ1rK?nOAibaC*vb%CF;I_~lkJawax%_+1J zLn(#pv_v{f0`v`Cfp6()7MB(>IoTAiQdKxgxX?VyV&KVZ7b$vn<8|Z<9$35C+G_8SH0x6Y(xB&~bmn%r}ceRwbc0000 - - - - Code coverage report for All files - - - - - - - - - -
-
-

All files

-
- -
- 100% - Statements - 500/500 -
- - -
- 100% - Branches - 194/194 -
- - -
- 100% - Functions - 80/80 -
- - -
- 100% - Lines - 500/500 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
ApiChain.js -
-
100%70/70100%11/11100%6/6100%70/70
CssChain.js -
-
100%241/241100%161/161100%62/62100%241/241
CssChainElement.js -
-
100%34/34100%6/6100%4/4100%34/34
css-chain-element.js -
-
100%5/5100%1/1100%0/0100%5/5
slots-in-shadow.js -
-
100%41/41100%3/3100%2/2100%41/41
slots-light-vs-shadow.js -
-
100%109/109100%12/12100%6/6100%109/109
-
-
-
- - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7c..0000000 --- a/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js deleted file mode 100644 index b322523..0000000 --- a/coverage/lcov-report/prettify.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/slots-in-shadow.js.html b/coverage/lcov-report/slots-in-shadow.js.html deleted file mode 100644 index 78c33a2..0000000 --- a/coverage/lcov-report/slots-in-shadow.js.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - Code coverage report for slots-in-shadow.js - - - - - - - - - -
-
-

All files slots-in-shadow.js

-
- -
- 100% - Statements - 41/41 -
- - -
- 100% - Branches - 3/3 -
- - -
- 100% - Functions - 2/2 -
- - -
- 100% - Lines - 41/41 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
-

-
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 -41 -423x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -3x -2x -2x -2x -2x -2x -2x -3x -3x - 
import { CssChain as $$ } from "./CssChain.js";
- 
-const templateStr=`
-    <i>out of slot</i>
-    <style>
-        div{padding: 0 1rem}
-        slot{ color: red}
-        p>slot{ color: darkviolet;}
-        slot slot{ color: green;}
-        slot slot slot{ color: blue;}
-    </style>
-    <slot style="background-color:red ">
-        default slot
-        <div><slot name="inner-1">inner 1</slot></div>
-        <div>
-            <slot name="inner-2">inner 2
-                <div><slot name="inner-2-1">inner 1 in 2</slot></div>
-                <div><slot name="inner-2-2">inner 2 in 2</slot></div>
-            </slot>
-        </div>
-    </slot>
-    <p>
-        prefix
-        <slot name="outer">
-            outer slot
-            <script type="bogus">ignore it</script>
-        </slot>
-        suffix
-    </p>
-`;
-class SlotsInShadowDemo extends HTMLElement
-{
-    constructor()
-    {   super();
-        let template = document.createElement('template');
-        template.innerHTML = templateStr;
-        this.attachShadow({mode: 'open'}).appendChild(template.content);
-        this.$ = css => css ?  $$(css,this.shadowRoot) : $$(this.shadowRoot);
-    }
-}
-window.customElements.define( 'slots-in-shadow', SlotsInShadowDemo);
- 
- -
-
- - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/slots-light-vs-shadow.js.html b/coverage/lcov-report/slots-light-vs-shadow.js.html deleted file mode 100644 index 83fe6fe..0000000 --- a/coverage/lcov-report/slots-light-vs-shadow.js.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - Code coverage report for slots-light-vs-shadow.js - - - - - - - - - -
-
-

All files slots-light-vs-shadow.js

-
- -
- 100% - Statements - 109/109 -
- - -
- 100% - Branches - 12/12 -
- - -
- 100% - Functions - 6/6 -
- - -
- 100% - Lines - 109/109 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
-

-
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 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -1101x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x - 
/* tests are using createTestTree(node) to
- * append the node clone with
- * initiated shadowDom on template parent ( id=host )
- */
-import { CssChain as $ } from "./CssChain.js";
- 
-// from https://github.com/chromium/chromium/edit/main/third_party/blink/web_tests/external/wpt/shadow-dom/resources/shadow-dom.js
-// changes:
-//      * added walkLightDom() code to test $.template()
-//      * createTestTree adds the cloned transformed node to parent
- 
-export function createTestTree( node )
-{
- 
-    let ids = {light:{}};
- 
-    function attachShadowFromTemplate( template )
-    {
-        let parent = template.parentNode;
-        parent.removeChild( template );
-        let shadowRoot;
-        if( template.getAttribute( 'data-slot-assignment' ) === 'manual' )
-        {   /* c8 ignore next 5 */
-            shadowRoot =
-                parent.attachShadow( {
-                    mode: template.getAttribute( 'data-mode' ),
-                    slotAssignment: 'manual'
-                } );
-        }else
-        {
-            shadowRoot = parent.attachShadow(
-                { mode: template.getAttribute( 'data-mode' ) } );
-        }
-        let id = template.id;
-        /* c8 ignore next 5 */
-        if( id )
-        {
-            shadowRoot.id = id;
-            ids[ id ] = shadowRoot;
-        }
-        shadowRoot.appendChild( document.importNode( template.content, true ) );
-        return shadowRoot;
-    }
- 
-    function walkShadowDom( root )
-    {   /* c8 ignore next 4 */
-        if( root.id )
-        {
-            ids[ root.id ] = root;
-        }
-        for( let e of Array.from( root.querySelectorAll( '[id]' ) ) )
-        {
-            ids[ e.id ] = e;
-        }
-        for( let e of Array.from( root.querySelectorAll( 'template' ) ) )
-        {
-            walkShadowDom( attachShadowFromTemplate( e ) );
-        }
-    }
- 
-    function walkLightDom( root ) // using CssChain
-    {   if( root.id )
-            ids.light[ root.id ] = root;
- 
-        $( '[id]',root ).map( e => ids.light[ e.id ] = e );
- 
-        $( 'template', root )
-            .map( t =>
-            {   const p = t.parentNode;
-                p.removeChild(t);
-                $(p).template(t);
-                walkLightDom( p );
-            });
-    }
- 
-    const cloneAppend = (n,classname) =>
-    {   let x = node.cloneNode( true );
-        x.id='';
-        x.classList.add(classname);
-        if( classname==='light')
-            ids.light[node.id]=x;
-        else
-            ids[node.id]=x;
-        n.parentNode.appendChild(x);
-        return x
-    };
- 
-    walkShadowDom( cloneAppend( node,'shadow' ) );
-    walkLightDom( cloneAppend( node ,'light'  ) );
- 
-    return ids;
-}
- 
-// https://github.com/chromium/chromium/blob/main/third_party/blink/web_tests/external/wpt/shadow-dom/resources/shadow-dom.js#L1
-export function removeWhiteSpaceOnlyTextNodes(node)
-{
-    for (var i = 0; i < node.childNodes.length; i++) {
-        var child = node.childNodes[i];
-        if (child.nodeType === Node.TEXT_NODE && child.nodeValue.trim().length == 0) {
-            node.removeChild(child);
-            i--;
-        } else if (child.nodeType === Node.ELEMENT_NODE || child.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
-            removeWhiteSpaceOnlyTextNodes(child);
-        }
-    }
-    if (node.shadowRoot) {
-        removeWhiteSpaceOnlyTextNodes(node.shadowRoot);
-    }
-}
- 
- -
-
- - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 03f704a609c6fd0dbfdac63466a7d7c958b5cbf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function(a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function(a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc - ? ' sorted-desc' - : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function() { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i = 0; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function() { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/coverage/lcov.info b/coverage/lcov.info deleted file mode 100644 index 9bfc032..0000000 --- a/coverage/lcov.info +++ /dev/null @@ -1,908 +0,0 @@ -TN: -SF:src\ApiChain.js -FN:5,setProp -FN:8,ApiChainLocal. -FN:16,get -FN:17,set -FN:24,applyPrototype -FN:44,ApiChain -FNF:6 -FNH:6 -FNDA:7,setProp -FNDA:4,ApiChainLocal. -FNDA:6,get -FNDA:4,set -FNDA:1,applyPrototype -FNDA:1,ApiChain -DA:1,7 -DA:2,7 -DA:3,7 -DA:4,7 -DA:5,7 -DA:6,7 -DA:7,7 -DA:8,7 -DA:9,4 -DA:10,4 -DA:11,4 -DA:12,4 -DA:13,4 -DA:14,7 -DA:15,7 -DA:16,7 -DA:17,7 -DA:18,4 -DA:19,4 -DA:20,4 -DA:21,7 -DA:22,7 -DA:23,7 -DA:24,7 -DA:25,1 -DA:26,1 -DA:27,1 -DA:28,1 -DA:29,1 -DA:30,1 -DA:31,1 -DA:32,1 -DA:33,1 -DA:34,1 -DA:35,1 -DA:36,1 -DA:37,1 -DA:38,1 -DA:39,1 -DA:40,1 -DA:41,1 -DA:42,1 -DA:43,1 -DA:44,7 -DA:45,1 -DA:46,1 -DA:47,1 -DA:48,1 -DA:49,1 -DA:50,1 -DA:51,1 -DA:52,1 -DA:53,1 -DA:54,1 -DA:55,1 -DA:56,1 -DA:57,1 -DA:58,1 -DA:59,1 -DA:60,1 -DA:61,1 -DA:62,1 -DA:63,1 -DA:64,1 -DA:65,1 -DA:66,1 -DA:67,1 -DA:68,1 -DA:69,1 -DA:70,7 -LF:70 -LH:70 -BRDA:1,0,0,7 -BRDA:5,1,0,7 -BRDA:8,2,0,7 -BRDA:10,3,0,4 -BRDA:11,4,0,7 -BRDA:16,5,0,13 -BRDA:16,6,0,13 -BRDA:17,7,0,7 -BRDA:18,8,0,7 -BRDA:24,9,0,7 -BRDA:44,10,0,7 -BRF:11 -BRH:11 -end_of_record -TN: -SF:src\CssChain.js -FN:2,map -FN:3,csv -FN:5,collectionText -FN:7,nop -FN:8,isArr -FN:9,isT -FN:10,isStr -FN:11,isNum -FN:12,isFn -FN:13,isNode -FN:14,inWC -FN:15,hasAssigned -FN:16,each -FN:17,clear -FN:21,1 -FN:27,3 -FN:28,11 -FN:30,getNodeText -FN:31,setNodeText -FN:35,assignParent -FN:36,collectionHtml -FN:41,html2NodeArr -FN:44,wrapIfText -FN:54,addNodeHtml -FN:56,set -FN:60,append -FN:70,setNodeHtml -FN:75,attr -FN:76,prop -FN:77,forEach -FN:78,map -FN:79,push -FN:80,querySelector -FN:81,querySelectorAll -FN:82,$ -FN:83,parent -FN:92,on -FN:93,append -FN:94,remove -FN:99,clear -FN:100,slot -FN:114,template -FN:135,get innerText -FN:136,set innerText -FN:137,text -FN:146,get outerHTML -FN:147,set outerHTML -FN:155,get innerHTML -FN:156,set innerHTML -FN:157,html -FN:166,assignedElements -FN:167,assignedNodes -FN:168,cloneNode -FN:169,clone -FN:191,get firstElementChild -FN:192,get firstChild -FN:193,get childNodes -FN:194,get children -FN:200,applyPrototype -FN:223,CssChain -FN:85,add -FN:86,parentLoop -FNF:62 -FNH:62 -FNDA:6,map -FNDA:2,csv -FNDA:6,collectionText -FNDA:1,nop -FNDA:6,isArr -FNDA:6,isT -FNDA:6,isStr -FNDA:2,isNum -FNDA:5,isFn -FNDA:2,isNode -FNDA:6,inWC -FNDA:6,hasAssigned -FNDA:2,each -FNDA:5,clear -FNDA:6,1 -FNDA:4,3 -FNDA:2,11 -FNDA:6,getNodeText -FNDA:4,setNodeText -FNDA:2,assignParent -FNDA:5,collectionHtml -FNDA:4,html2NodeArr -FNDA:4,wrapIfText -FNDA:5,addNodeHtml -FNDA:4,set -FNDA:5,append -FNDA:5,setNodeHtml -FNDA:1,attr -FNDA:1,prop -FNDA:6,forEach -FNDA:5,map -FNDA:6,push -FNDA:1,querySelector -FNDA:6,querySelectorAll -FNDA:6,$ -FNDA:2,parent -FNDA:1,on -FNDA:2,append -FNDA:2,remove -FNDA:2,clear -FNDA:4,slot -FNDA:1,template -FNDA:4,get innerText -FNDA:4,set innerText -FNDA:6,text -FNDA:1,get outerHTML -FNDA:1,set outerHTML -FNDA:5,get innerHTML -FNDA:3,set innerHTML -FNDA:5,html -FNDA:1,assignedElements -FNDA:3,assignedNodes -FNDA:1,cloneNode -FNDA:2,clone -FNDA:1,get firstElementChild -FNDA:1,get firstChild -FNDA:1,get childNodes -FNDA:2,get children -FNDA:6,applyPrototype -FNDA:6,CssChain -FNDA:2,add -FNDA:1,parentLoop -DA:1,6 -DA:2,6 -DA:3,6 -DA:4,6 -DA:5,6 -DA:6,6 -DA:7,6 -DA:8,6 -DA:9,6 -DA:10,6 -DA:11,6 -DA:12,6 -DA:13,6 -DA:14,6 -DA:15,6 -DA:16,6 -DA:17,6 -DA:18,5 -DA:19,6 -DA:20,6 -DA:21,6 -DA:22,6 -DA:23,6 -DA:24,5 -DA:25,5 -DA:26,6 -DA:27,6 -DA:28,6 -DA:29,6 -DA:30,6 -DA:31,6 -DA:32,4 -DA:33,4 -DA:34,6 -DA:35,6 -DA:36,6 -DA:37,5 -DA:38,5 -DA:39,6 -DA:40,6 -DA:41,6 -DA:42,4 -DA:43,4 -DA:44,4 -DA:45,4 -DA:46,4 -DA:47,3 -DA:48,3 -DA:49,3 -DA:50,4 -DA:51,4 -DA:52,6 -DA:53,6 -DA:54,6 -DA:55,5 -DA:56,5 -DA:57,4 -DA:58,4 -DA:59,4 -DA:60,5 -DA:61,5 -DA:62,2 -DA:63,2 -DA:64,5 -DA:65,5 -DA:66,5 -DA:67,5 -DA:68,5 -DA:69,5 -DA:70,6 -DA:71,6 -DA:72,6 -DA:73,6 -DA:74,6 -DA:75,6 -DA:76,6 -DA:77,6 -DA:78,6 -DA:79,6 -DA:80,6 -DA:81,6 -DA:82,6 -DA:83,6 -DA:84,2 -DA:85,2 -DA:86,2 -DA:87,1 -DA:88,1 -DA:89,2 -DA:90,2 -DA:91,2 -DA:92,6 -DA:93,6 -DA:94,6 -DA:95,2 -DA:96,2 -DA:97,2 -DA:98,2 -DA:99,6 -DA:100,6 -DA:101,4 -DA:102,4 -DA:103,2 -DA:104,2 -DA:105,2 -DA:106,2 -DA:107,4 -DA:108,4 -DA:109,4 -DA:110,1 -DA:111,1 -DA:112,4 -DA:113,4 -DA:114,6 -DA:115,1 -DA:116,1 -DA:117,1 -DA:118,1 -DA:119,1 -DA:120,1 -DA:121,1 -DA:122,1 -DA:123,1 -DA:124,1 -DA:125,1 -DA:126,1 -DA:127,1 -DA:128,1 -DA:129,1 -DA:130,1 -DA:131,1 -DA:132,1 -DA:133,1 -DA:134,1 -DA:135,6 -DA:136,6 -DA:137,6 -DA:138,6 -DA:139,6 -DA:140,6 -DA:141,6 -DA:142,6 -DA:143,6 -DA:144,6 -DA:145,6 -DA:146,6 -DA:147,6 -DA:148,1 -DA:149,1 -DA:150,1 -DA:151,1 -DA:152,1 -DA:153,1 -DA:154,1 -DA:155,6 -DA:156,6 -DA:157,6 -DA:158,5 -DA:159,5 -DA:160,5 -DA:161,3 -DA:162,3 -DA:163,5 -DA:164,5 -DA:165,5 -DA:166,6 -DA:167,6 -DA:168,6 -DA:169,6 -DA:170,2 -DA:171,2 -DA:172,2 -DA:173,2 -DA:174,2 -DA:175,2 -DA:176,2 -DA:177,2 -DA:178,2 -DA:179,2 -DA:180,2 -DA:181,2 -DA:182,2 -DA:183,2 -DA:184,2 -DA:185,2 -DA:186,2 -DA:187,2 -DA:188,2 -DA:189,2 -DA:190,2 -DA:191,6 -DA:192,6 -DA:193,6 -DA:194,6 -DA:195,6 -DA:196,6 -DA:197,6 -DA:198,6 -DA:199,6 -DA:200,6 -DA:201,6 -DA:202,6 -DA:203,6 -DA:204,6 -DA:205,6 -DA:206,6 -DA:207,6 -DA:208,6 -DA:209,6 -DA:210,6 -DA:211,6 -DA:212,6 -DA:213,6 -DA:214,6 -DA:215,6 -DA:216,6 -DA:217,6 -DA:218,6 -DA:219,6 -DA:220,6 -DA:221,6 -DA:222,6 -DA:223,6 -DA:224,6 -DA:225,6 -DA:226,6 -DA:227,6 -DA:228,6 -DA:229,6 -DA:230,6 -DA:231,6 -DA:232,6 -DA:233,6 -DA:234,1 -DA:235,6 -DA:236,6 -DA:237,6 -DA:238,6 -DA:239,6 -DA:240,6 -DA:241,6 -LF:241 -LH:241 -BRDA:1,0,0,366 -BRDA:2,1,0,6 -BRDA:5,2,0,11 -BRDA:5,3,0,11 -BRDA:8,4,0,6 -BRDA:9,5,0,6 -BRDA:10,6,0,6 -BRDA:12,7,0,6 -BRDA:14,8,0,6 -BRDA:15,9,0,11 -BRDA:17,10,0,10 -BRDA:18,11,0,6 -BRDA:21,12,0,8 -BRDA:22,13,0,2 -BRDA:23,14,0,7 -BRDA:27,15,0,6 -BRDA:30,16,0,11 -BRDA:30,17,0,11 -BRDA:36,18,0,6 -BRDA:36,19,0,9 -BRDA:37,20,0,6 -BRDA:41,21,0,6 -BRDA:44,22,0,6 -BRDA:47,23,0,5 -BRDA:51,24,0,6 -BRDA:54,25,0,10 -BRDA:67,26,0,4 -BRDA:56,27,0,10 -BRDA:57,28,0,5 -BRDA:58,29,0,5 -BRDA:60,30,0,10 -BRDA:61,31,0,6 -BRDA:70,32,0,6 -BRDA:77,33,0,6 -BRDA:78,34,0,6 -BRDA:79,35,0,6 -BRDA:81,36,0,11 -BRDA:81,37,0,11 -BRDA:82,38,0,11 -BRDA:100,39,0,10 -BRDA:102,40,0,8 -BRDA:109,41,0,3 -BRDA:101,42,0,6 -BRDA:137,43,0,14 -BRDA:138,44,0,1 -BRDA:143,45,0,8 -BRDA:155,46,0,6 -BRDA:156,47,0,6 -BRDA:157,48,0,12 -BRDA:158,49,0,2 -BRDA:162,50,0,6 -BRDA:163,51,0,4 -BRDA:200,52,0,6 -BRDA:202,53,0,1 -BRDA:215,54,0,1 -BRDA:219,55,0,6 -BRDA:220,56,0,6 -BRDA:221,57,0,6 -BRDA:223,58,0,10 -BRDA:227,59,0,5 -BRDA:228,60,0,4 -BRDA:228,61,0,1 -BRDA:233,62,0,1 -BRDA:236,63,0,6 -BRDA:3,64,0,366 -BRDA:7,65,0,366 -BRDA:16,66,0,366 -BRDA:18,67,0,6 -BRDA:28,68,0,366 -BRDA:31,69,0,366 -BRDA:33,70,0,366 -BRDA:35,71,0,366 -BRDA:35,72,0,366 -BRDA:38,73,0,9 -BRDA:37,74,0,6 -BRDA:62,75,0,6 -BRDA:82,76,0,11 -BRDA:107,77,0,10 -BRDA:103,78,0,8 -BRDA:136,79,0,366 -BRDA:140,80,0,14 -BRDA:142,81,0,14 -BRDA:143,82,0,8 -BRDA:161,83,0,12 -BRDA:163,84,0,12 -BRDA:167,85,0,366 -BRDA:167,86,0,366 -BRDA:167,87,0,366 -BRDA:11,88,0,366 -BRDA:13,89,0,366 -BRDA:15,90,0,11 -BRDA:22,91,0,8 -BRDA:26,92,0,7 -BRDA:33,93,0,366 -BRDA:75,94,0,366 -BRDA:76,95,0,366 -BRDA:76,96,0,366 -BRDA:80,97,0,366 -BRDA:83,98,0,366 -BRDA:85,99,0,366 -BRDA:86,100,0,366 -BRDA:90,101,0,366 -BRDA:90,102,0,366 -BRDA:93,103,0,366 -BRDA:93,104,0,366 -BRDA:99,105,0,366 -BRDA:99,106,0,366 -BRDA:135,107,0,366 -BRDA:142,108,0,14 -BRDA:146,109,0,366 -BRDA:146,110,0,366 -BRDA:147,111,0,366 -BRDA:148,112,0,366 -BRDA:151,113,0,366 -BRDA:162,114,0,6 -BRDA:168,115,0,366 -BRDA:168,116,0,366 -BRDA:169,117,0,366 -BRDA:173,118,0,366 -BRDA:177,119,0,366 -BRDA:177,120,0,366 -BRDA:183,121,0,366 -BRDA:189,122,0,366 -BRDA:189,123,0,366 -BRDA:191,124,0,366 -BRDA:191,125,0,366 -BRDA:191,126,0,366 -BRDA:192,127,0,366 -BRDA:192,128,0,366 -BRDA:192,129,0,366 -BRDA:193,130,0,366 -BRDA:193,131,0,366 -BRDA:193,132,0,366 -BRDA:194,133,0,366 -BRDA:194,134,0,366 -BRDA:194,135,0,366 -BRDA:19,136,0,10 -BRDA:34,137,0,366 -BRDA:64,138,0,10 -BRDA:166,139,0,366 -BRDA:166,140,0,366 -BRDA:166,141,0,366 -BRDA:13,142,0,366 -BRDA:68,143,0,10 -BRDA:58,144,0,10 -BRDA:90,145,0,366 -BRDA:85,146,0,366 -BRDA:94,147,0,366 -BRDA:97,148,0,366 -BRDA:96,149,0,366 -BRDA:114,150,0,366 -BRDA:117,151,0,366 -BRDA:127,152,0,366 -BRDA:128,153,0,366 -BRDA:132,154,0,366 -BRDA:173,155,0,366 -BRDA:179,156,0,366 -BRDA:181,157,0,366 -BRDA:184,158,0,366 -BRDA:92,159,0,366 -BRDA:228,160,0,10 -BRF:161 -BRH:161 -end_of_record -TN: -SF:src\CssChainElement.js -FN:6,CssChainElement -FN:19,get template -FN:27,$ -FN:29,__increment -FNF:4 -FNH:4 -FNDA:1,CssChainElement -FNDA:1,get template -FNDA:1,$ -FNDA:1,__increment -DA:1,1 -DA:2,1 -DA:3,1 -DA:4,1 -DA:5,1 -DA:6,1 -DA:7,1 -DA:8,1 -DA:9,1 -DA:10,1 -DA:11,1 -DA:12,1 -DA:13,1 -DA:14,1 -DA:15,1 -DA:16,1 -DA:17,1 -DA:18,1 -DA:19,1 -DA:20,1 -DA:21,1 -DA:22,1 -DA:23,1 -DA:24,1 -DA:25,1 -DA:26,1 -DA:27,1 -DA:28,1 -DA:29,1 -DA:30,1 -DA:31,1 -DA:32,1 -DA:33,1 -DA:34,1 -LF:34 -LH:34 -BRDA:1,0,0,1 -BRDA:6,1,0,1 -BRDA:16,2,0,1 -BRDA:19,3,0,1 -BRDA:27,4,0,1 -BRDA:29,5,0,1 -BRF:6 -BRH:6 -end_of_record -TN: -SF:src\css-chain-element.js -FNF:0 -FNH:0 -DA:1,1 -DA:2,1 -DA:3,1 -DA:4,1 -DA:5,1 -LF:5 -LH:5 -BRDA:1,0,0,1 -BRF:1 -BRH:1 -end_of_record -TN: -SF:src\slots-in-shadow.js -FN:33,SlotsInShadowDemo -FN:38,SlotsInShadowDemo.$ -FNF:2 -FNH:2 -FNDA:2,SlotsInShadowDemo -FNDA:2,SlotsInShadowDemo.$ -DA:1,3 -DA:2,3 -DA:3,3 -DA:4,3 -DA:5,3 -DA:6,3 -DA:7,3 -DA:8,3 -DA:9,3 -DA:10,3 -DA:11,3 -DA:12,3 -DA:13,3 -DA:14,3 -DA:15,3 -DA:16,3 -DA:17,3 -DA:18,3 -DA:19,3 -DA:20,3 -DA:21,3 -DA:22,3 -DA:23,3 -DA:24,3 -DA:25,3 -DA:26,3 -DA:27,3 -DA:28,3 -DA:29,3 -DA:30,3 -DA:31,3 -DA:32,3 -DA:33,3 -DA:34,2 -DA:35,2 -DA:36,2 -DA:37,2 -DA:38,2 -DA:39,2 -DA:40,3 -DA:41,3 -LF:41 -LH:41 -BRDA:1,0,0,3 -BRDA:33,1,0,3 -BRDA:38,2,0,3 -BRF:3 -BRH:3 -end_of_record -TN: -SF:src\slots-light-vs-shadow.js -FN:12,createTestTree -FN:17,attachShadowFromTemplate -FN:45,walkShadowDom -FN:61,walkLightDom -FN:76,cloneAppend -FN:95,removeWhiteSpaceOnlyTextNodes -FNF:6 -FNH:6 -FNDA:1,createTestTree -FNDA:1,attachShadowFromTemplate -FNDA:1,walkShadowDom -FNDA:1,walkLightDom -FNDA:1,cloneAppend -FNDA:1,removeWhiteSpaceOnlyTextNodes -DA:1,1 -DA:2,1 -DA:3,1 -DA:4,1 -DA:5,1 -DA:6,1 -DA:7,1 -DA:8,1 -DA:9,1 -DA:10,1 -DA:11,1 -DA:12,1 -DA:13,1 -DA:14,1 -DA:15,1 -DA:16,1 -DA:17,1 -DA:18,1 -DA:19,1 -DA:20,1 -DA:21,1 -DA:22,1 -DA:23,1 -DA:24,1 -DA:25,1 -DA:26,1 -DA:27,1 -DA:28,1 -DA:29,1 -DA:30,1 -DA:31,1 -DA:32,1 -DA:33,1 -DA:34,1 -DA:35,1 -DA:36,1 -DA:37,1 -DA:38,1 -DA:39,1 -DA:40,1 -DA:41,1 -DA:42,1 -DA:43,1 -DA:44,1 -DA:45,1 -DA:46,1 -DA:47,1 -DA:48,1 -DA:49,1 -DA:50,1 -DA:51,1 -DA:52,1 -DA:53,1 -DA:54,1 -DA:55,1 -DA:56,1 -DA:57,1 -DA:58,1 -DA:59,1 -DA:60,1 -DA:61,1 -DA:62,1 -DA:63,1 -DA:64,1 -DA:65,1 -DA:66,1 -DA:67,1 -DA:68,1 -DA:69,1 -DA:70,1 -DA:71,1 -DA:72,1 -DA:73,1 -DA:74,1 -DA:75,1 -DA:76,1 -DA:77,1 -DA:78,1 -DA:79,1 -DA:80,1 -DA:81,1 -DA:82,1 -DA:83,1 -DA:84,1 -DA:85,1 -DA:86,1 -DA:87,1 -DA:88,1 -DA:89,1 -DA:90,1 -DA:91,1 -DA:92,1 -DA:93,1 -DA:94,1 -DA:95,1 -DA:96,1 -DA:97,1 -DA:98,1 -DA:99,1 -DA:100,1 -DA:101,1 -DA:102,1 -DA:103,1 -DA:104,1 -DA:105,1 -DA:106,1 -DA:107,1 -DA:108,1 -DA:109,1 -LF:109 -LH:109 -BRDA:1,0,0,1 -BRDA:12,1,0,1 -BRDA:17,2,0,1 -BRDA:23,3,0,1 -BRDA:37,4,0,1 -BRDA:45,5,0,1 -BRDA:48,6,0,1 -BRDA:61,7,0,1 -BRDA:65,8,0,1 -BRDA:68,9,0,1 -BRDA:76,10,0,1 -BRDA:95,11,0,1 -BRF:12 -BRH:12 -end_of_record diff --git a/dist/ApiChain.js b/dist/ApiChain.js deleted file mode 100644 index 05f4ca1..0000000 --- a/dist/ApiChain.js +++ /dev/null @@ -1,2 +0,0 @@ -const u=new Map,a=Object.getPrototypeOf({});export const setProp=(n,t,i)=>{typeof n[t]=="function"?i.prototype[t]=function(...e){return t.startsWith("get")?this.length?this[0][t](...e):void 0:(this.forEach(o=>o[t](...e)),this)}:Object.defineProperty(i.prototype,t,{get:function(){return this.length?this[0][t]:void 0},set:function(e){return this.forEach(o=>o[t]=e),e}})};function h(n,t){let i=u.get(n);if(i)return i;class e extends Array{}const o={constructor:1};for(let r=t;r!==a&&r!=null;r=Object.getPrototypeOf(r))for(let s of Object.getOwnPropertyNames(r))o[s]||(setProp(t,s,e),o[s]=1);return u.set(n,e),e}export function ApiChain(n,t=void 0){const i=Array.isArray(n),e=i?n:[n];t||(t=Object.getPrototypeOf(i?n[0]:n));const o=e[0];if(t===a){class p extends Array{}for(let f in o)setProp(o,f,p);const c=new p;return c.push(...e),c}const r=h(t,o),s=new r;return s.push(...e),s}export default ApiChain; -//# sourceMappingURL=ApiChain.js.map diff --git a/dist/ApiChain.js.map b/dist/ApiChain.js.map deleted file mode 100644 index 0f17b04..0000000 --- a/dist/ApiChain.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../node_modules/css-chain/ApiChain.js"], - "sourcesContent": ["const Prototype2ApiChain = new Map();\nconst OBJ_prototype = Object.getPrototypeOf( {} );\n\n export const\nsetProp = ( refObj, k, ApiChainLocal )=>\n{\n if( typeof refObj[ k ] == 'function' )\n { ApiChainLocal.prototype[ k ] = function( ...args )\n { if( k.startsWith('get') )\n return this.length ? this[0][k](...args) : undefined;\n this.forEach( el => el[ k ]( ...args ) );\n return this;\n }\n }else\n { Object.defineProperty( ApiChainLocal.prototype, k,\n { get : function(){ return this.length ? this[ 0 ][ k ] : undefined }\n , set: function( v )\n { this.forEach( el => el[ k ] = v );\n return v\n }\n } );\n }\n}\n function\napplyPrototype( elementProto, refObj )\n{ let ChainClass = Prototype2ApiChain.get(elementProto);\n if( ChainClass )\n return ChainClass;\n\n class ApiChainLocal extends Array{}\n\n const applied = {\"constructor\":1};\n for ( let obj=refObj; obj !== OBJ_prototype && obj != null ; obj = Object.getPrototypeOf(obj))\n {\n for( let k of Object.getOwnPropertyNames(obj) )\n if( !applied[k])\n { setProp( refObj, k, ApiChainLocal );\n applied[k]=1;\n }\n }\n Prototype2ApiChain.set(elementProto, ApiChainLocal);\n return ApiChainLocal;\n}\n export function\nApiChain( elOrArr, elementProto = undefined )\n{\n const isArr = Array.isArray( elOrArr );\n const arr = isArr ? elOrArr : [ elOrArr ];\n if( ! elementProto )\n elementProto = Object.getPrototypeOf( isArr ? elOrArr[0] : elOrArr );\n const refObj = arr[0];\n if( elementProto === OBJ_prototype )\n {\n class ApiChainLocal extends Array{}\n\n for( let k in refObj )\n setProp( refObj, k, ApiChainLocal );\n const ret = new ApiChainLocal();\n ret.push(...arr);\n return ret;\n }\n\n // class object\n const ApiChain = applyPrototype( elementProto, refObj );\n\n const ret = new ApiChain();\n ret.push(...arr);\n return ret;\n}\nexport default ApiChain;\n"], - "mappings": "AAAA,KAAM,GAAqB,GAAI,KACzB,EAAgB,OAAO,eAAgB,IAElC,YACX,SAAU,CAAE,EAAQ,EAAG,IACvB,CACI,AAAI,MAAO,GAAQ,IAAO,WACtB,EAAc,UAAW,GAAM,YAAa,EAC5C,CAAI,MAAI,GAAE,WAAW,OACN,KAAK,OAAS,KAAK,GAAG,GAAG,GAAG,GAAQ,OAC/C,MAAK,QAAS,GAAM,EAAI,GAAK,GAAG,IACzB,OAGX,OAAO,eAAgB,EAAc,UAAW,EAChD,CAAI,IAAO,UAAU,CAAE,MAAO,MAAK,OAAS,KAAM,GAAK,GAAM,QACzD,IAAK,SAAU,EACf,CAAG,YAAK,QAAS,GAAM,EAAI,GAAM,GACvB,MAKlB,WACY,EAAc,EAC9B,CAAI,GAAI,GAAa,EAAmB,IAAI,GACxC,GAAI,EACA,MAAO,GAEX,eAA4B,MAAK,EAEjC,KAAM,GAAU,CAAC,YAAc,GAC/B,OAAU,GAAI,EAAQ,IAAQ,GAAiB,GAAO,KAAO,EAAM,OAAO,eAAe,GAErF,OAAS,KAAK,QAAO,oBAAoB,GACrC,AAAK,EAAQ,IACT,SAAS,EAAQ,EAAG,GACpB,EAAQ,GAAG,GAGvB,SAAmB,IAAI,EAAc,GAC9B,EAEA,yBACD,EAAS,EAAe,OAClC,CACI,KAAM,GAAQ,MAAM,QAAS,GACvB,EAAO,EAAQ,EAAU,CAAE,GACjC,AAAM,GACF,GAAe,OAAO,eAAgB,EAAQ,EAAQ,GAAK,IAC/D,KAAM,GAAS,EAAI,GACnB,GAAI,IAAiB,EACrB,CACI,eAA4B,MAAK,EAEjC,OAAS,KAAK,GACV,QAAS,EAAQ,EAAG,GACxB,KAAM,GAAM,GAAI,GAChB,SAAI,KAAK,GAAG,GACL,EAIX,KAAM,GAAW,EAAgB,EAAc,GAEzC,EAAM,GAAI,GAChB,SAAI,KAAK,GAAG,GACL,EAEX,cAAe", - "names": [] -} diff --git a/dist/CssChain.js b/dist/CssChain.js deleted file mode 100644 index 65f4e3a..0000000 --- a/dist/CssChain.js +++ /dev/null @@ -1,2 +0,0 @@ -import{setProp as E}from"./ApiChain.js";export const map=(t,...e)=>Array.prototype.map.apply(t,e),csv=(t,...e)=>map(t,...e).join(","),collectionText=t=>map(t,e=>getNodeText(e)).join("");const y=()=>"",c=t=>Array.isArray(t),l=(t,e)=>typeof t===e,u=t=>l(t,"string"),x=t=>l(t,"number"),p=t=>l(t,"function"),w=t=>t&&t.nodeType,L=t=>t.getRootNode().host,m=t=>L(t)&&t.assignedNodes,S=(t,e)=>(t.forEach(e),t),N=t=>m(t)?t.assignedNodes().forEach(e=>e.remove()):t.innerHTML="",A={1:t=>t.assignedNodes?collectionText(t.assignedNodes())||collectionText(t.childNodes):["SCRIPT","AUDIO","STYLE","CANVAS","DATALIST","EMBED","OBJECT","PICTURE","IFRAME","METER","NOSCRIPT","SELECT","OPTGROUP","PROGRESS","TEMPLATE","VIDEO"].includes(t.nodeName)?"":t.innerText,3:t=>t.nodeValue,11:t=>collectionText(t.childNodes)};export const getNodeText=t=>(A[t.nodeType]||y)(t),setNodeText=(t,e)=>m(t)?t.assignedElements().forEach(r=>r.innerText=e):t.innerText=e,assignParent=(t,e)=>t.map(r=>e.appendChild(r)),collectionHtml=t=>map(t,e=>e.assignedElements?map(e.assignedElements(),r=>r.outerHTML).join(""):e.innerHTML).join(""),html2NodeArr=t=>{const e=document.createElement("div");e.innerHTML=t;const r=o=>{if(o.nodeType!==3)return o;const s=document.createElement("span");return s.append(o),s};return[...e.childNodes].map(o=>(o.remove(),o)).map(r)},addNodeHtml=(t,e)=>{const r=(s,n)=>n instanceof Node?n.remove()||s.append(n):html2NodeArr(n).forEach(i=>s.append(i)),o=s=>m(t)?t.assign(...t.assignedNodes(),...assignParent(S(html2NodeArr(s),n=>n.slot=t.name),t.getRootNode().host)):r(t,s);e instanceof NodeList||c(e)?[...e].forEach(o):o(e)},setNodeHtml=(t,e)=>{N(t),addNodeHtml(t,e)};class h extends Array{attr(...e){return e.length>1?((e[2]?this.$(e[2]):this).setAttribute(...e),this):this.getAttribute(...e)}prop(...e){return e.length>1?((e[2]?this.$(e[2]):this).forEach(r=>r[e[0]]=e[1]),this):this[0][e[0]]}forEach(...e){return Array.prototype.forEach.apply(this,e),this}map(...e){return map(this,...e)}push(...e){return Array.prototype.push.apply(this,e),this}querySelector(e){return new h().push(this.querySelectorAll(e)[0])}querySelectorAll(e){return this.reduce((r,o)=>r.push(...(o.shadowRoot||o).querySelectorAll(e)),new h)}$(...e){return e.length?this.querySelectorAll(...e):this}parent(e){const r=new Set,o=n=>r.has(n)?0:(r.add(n),n),s=n=>{for(;n=n.parentElement;)if(n.matches(e))return o(n)};return CssChain(this.map(e?s:n=>o(n.parentElement)).filter(n=>n))}on(...e){return this.addEventListener(...e)}append(e){return this.forEach(r=>addNodeHtml(r,e))}remove(...e){return e.length?p(e[1])?this.removeEventListener(...e):this.map(r=>r.matches(e[0])).filter(r=>r):(this.forEach(r=>r.remove()),new h)}clear(){return this.forEach(e=>N(e))}slot(...e){const r=this.map(o=>o.shadowRoot||o).$(e.length?csv(e[0].split(","),o=>['""',"''"].includes(o)||!o?"slot:not([name])":`slot[name="${o}"]`):"slot");return e.length===2?(r.html(e[1]),this):r}template(e){if(e===void 0){const o=this.$("[slot]").forEach(s=>s.remove());e=this.splice(0,this.length),this.push(document.createElement("span")),this.append(o)}else u(e)&&(e=this.$(e),e.remove());const r=CssChain(e.content||e).clone(this);return r.slot().forEach(o=>{const s=this.children.filter(n=>n.slot===o.name);s.length&&setNodeHtml(o,s)}),this.children.remove(),this.forEach((o,s)=>o.appendChild(r[s])),this}get innerText(){return this.text()}set innerText(e){return this.text(e)}text(e,r=void 0){const o=r?this.$(r):this;return e===void 0?collectionText(o):(o.forEach(p(e)?(s,n)=>setNodeText(s,e(s,n,o)):s=>setNodeText(s,e)),this)}get outerHTML(){return this.map(e=>e.outerHTML).join("")}set outerHTML(e){return this.forEach((r,o,s)=>{const n=r.parentNode;html2NodeArr(p(e)?e(r,o,s):e).forEach(i=>n.insertBefore(s[o]=i,r)),r.remove()})}get innerHTML(){return this.html()}set innerHTML(e){return this.html(e)}html(e,r=void 0){const o=r?this.$(r):this;return e===void 0?collectionHtml(o):(o.forEach(p(e)?(s,n)=>setNodeHtml(s,e(s,n,o)):s=>setNodeHtml(s,e)),this)}assignedElements(){return CssChain([].concat(...this.map(e=>e.assignedElements?e.assignedElements():[])))}assignedNodes(e){return CssChain([].concat(...this.map(r=>r.assignedNodes?r.assignedNodes(e):[])))}cloneNode(...e){return this.map(r=>r.cloneNode&&r.cloneNode(...e))}clone(e=1,r=void 0){let o=e;if(x(e)&&(o=Array.from({length:e},(n,i)=>i)),c(o)){const n=[];return this.forEach(i=>o.forEach((g,T)=>{const f=i.ownerDocument.importNode(i,!0),d=r&&r(f,g,T,o);u(d)?n.push(...html2NodeArr(d)):c(d)?n.push(...d):n.push(w(d)?d:f)})),CssChain(n)}const s=e;return this.map(n=>s?s.importNode(n,!0):n.cloneNode?n.cloneNode(!0):Object.assign({},n))}get firstElementChild(){return CssChain(this.map(e=>e.firstElementChild).filter(e=>e))}get firstChild(){return CssChain(this.map(e=>e.firstChild).filter(e=>e))}get childNodes(){return CssChain([].concat(...map(this,e=>[...e.childNodes||[]])))}get children(){return CssChain([].concat(...map(this,e=>[...e.children||[]])))}}const a=new Set,O=Object.getPrototypeOf({});export function applyPrototype(t,e){const r=u(t)?document.createElement(t):t;if(!a.has(r.tagName)){a.add(r.tagName);for(let o in r)o in e.prototype||E(r,o,e);for(let o;(o=Object.getPrototypeOf(r))!==O&&o!=null&&!a.has(o);){a.add(o);for(let s of Object.getOwnPropertyNames(o))s in e.prototype||E(r,s,e)}}}Object.getOwnPropertyNames(window).filter(t=>t.startsWith("HTML")&&t.endsWith("Element")&&t.length>11).map(t=>t.substring(4,t.length-7).toLowerCase()).forEach(t=>applyPrototype(document.createElement(t),h));export function CssChain(t,e=document,r=[]){const o=typeof t=="string"?e.querySelectorAll(t):c(t)?t:[t?t.shadowRoot||t:document];c(r)?r.length||(r=[...o].slice(0,256)):r=[r],r.forEach(n=>applyPrototype(n,h));const s=new h;return s.push(...o),s}export default CssChain; -//# sourceMappingURL=CssChain.js.map diff --git a/dist/CssChain.js.map b/dist/CssChain.js.map deleted file mode 100644 index d96af36..0000000 --- a/dist/CssChain.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../node_modules/css-chain/CssChain.js"], - "sourcesContent": ["import { setProp } from './ApiChain.js';\nexport const map = (arr, ...args ) => Array.prototype.map.apply( arr, args );\nexport const csv = (arr, ...args ) => map( arr, ...args ).join(',');\n\nexport const collectionText = arr=> map(arr, e=>getNodeText(e)).join('')\n\nconst nop = ()=>''\n, isArr = a => Array.isArray(a)\n, isT = (a,t) => typeof a === t\n, isStr = a => isT(a, 'string')\n, isNum = a => isT(a, 'number')\n, isFn = a => isT(a, 'function')\n, isNode = n => n && n.nodeType\n, inWC = n => n.getRootNode().host\n, hasAssigned = n=> inWC(n) && n.assignedNodes\n, each = (arr, cb )=> (arr.forEach(cb),arr)\n, clear = n => hasAssigned(n)\n ? n.assignedNodes().forEach( a => a.remove() )\n : n.innerHTML='' ;\n\nconst node2text = { 1: n=>n.assignedNodes\n ? collectionText(n.assignedNodes()) || collectionText(n.childNodes)\n : [ 'SCRIPT','AUDIO','STYLE','CANVAS','DATALIST','EMBED','OBJECT'\n , 'PICTURE','IFRAME','METER','NOSCRIPT'\n , 'SELECT','OPTGROUP','PROGRESS','TEMPLATE','VIDEO'\n ].includes(n.nodeName)? '' : n.innerText //collectionText(n.children)\n , 3: n=>n.nodeValue\n , 11:n=>collectionText(n.childNodes)\n };\nexport const getNodeText = n => (node2text[n.nodeType] || nop)(n);\nexport const setNodeText = ( n, val ) =>\n hasAssigned(n)\n ? n.assignedElements().forEach( e => e.innerText = val )\n : n.innerText = val;\nexport const assignParent = (arr,n)=>arr.map( e=>n.appendChild(e))\nexport const collectionHtml = arr => map( arr, n=>n.assignedElements\n ? map( n.assignedElements(), e=>e.outerHTML ).join('')\n : n.innerHTML\n ).join('');\n\nexport const html2NodeArr = html =>\n{ const n = document.createElement('div');\n n.innerHTML = html;\n const wrapIfText = e=>{\n if( e.nodeType !== 3 )\n return e;\n const n = document.createElement('span');\n n.append(e);\n return n;\n };\n return [...n.childNodes].map(e=>(e.remove(),e)).map(wrapIfText);\n};\n\nexport const addNodeHtml = ( n, val ) =>\n{\n const set = ( to, v )=> ( v instanceof Node\n ? v.remove() || to.append(v)\n : html2NodeArr(v).forEach( e=>to.append(e) )\n )\n , append = v => hasAssigned(n)\n ? n.assign( ...n.assignedNodes()\n , ...assignParent( each( html2NodeArr(v), e=>e.slot=n.name )\n , n.getRootNode().host ) )\n : set(n,v);\n\n val instanceof NodeList || isArr(val)\n ? [ ...val ].forEach( append )\n : append(val);\n}\nexport const setNodeHtml = ( n, val ) => { clear(n); addNodeHtml(n,val) };\n\n class\nCssChainLocal extends Array\n{\n attr(...args){ return args.length>1 ? (( args[2] ? this.$(args[2]) : this ).setAttribute(...args),this) : this.getAttribute(...args) }\n prop(...args){ return args.length>1 ? (( args[2] ? this.$(args[2]) : this ).forEach( el=>el[args[0]]=args[1]),this ): this[0][args[0]] }\n forEach( ...args){ Array.prototype.forEach.apply(this,args); return this }\n map( ...args){ return map(this,...args) }\n push(...args){ Array.prototype.push.apply(this,args); return this; }\n querySelector(css){ return new CssChainLocal().push( this.querySelectorAll(css)[0] ) }\n querySelectorAll(css){ return this.reduce( ($,el)=> $.push(...(el.shadowRoot||el).querySelectorAll(css) ), new CssChainLocal()) }\n $(...args){ return args.length ? this.querySelectorAll(...args) : this; }\n parent(css)\n { const s = new Set()\n , add = n=> s.has(n) ? 0 : (s.add(n), n)\n , parentLoop = n=> { while( n=n.parentElement )\n if( n.matches(css) )\n return add(n);\n };\n return CssChain(this.map( css ? parentLoop : n=>add(n.parentElement) ).filter(n=>n));\n }\n on(...args){ return this.addEventListener(...args) }\n append(val){ return this.forEach( n=> addNodeHtml(n,val)) }\n remove(...args)\n { if( !args.length )\n { this.forEach(el=>el.remove()); return new CssChainLocal() }\n return isFn(args[1]) ? this.removeEventListener(...args) : this.map(el=>el.matches(args[0])).filter(el=>el) ;\n }\n clear(){ return this.forEach(n=>clear(n)) }\n slot(...arr)\n { const ret = this.map( n=>n.shadowRoot || n ).$( arr.length\n ? csv( arr[0].split(',')\n , n=> ['\"\"',\"''\"].includes(n) || !n\n ? `slot:not([name])`\n : `slot[name=\"${n}\"]`\n )\n : 'slot');\n if( arr.length === 2 )\n { ret.html( arr[ 1 ] );\n return this\n }\n return ret;\n }\n template(n)\n {\n if( n === undefined )\n { const x = this.$('[slot]').forEach(n=>n.remove());\n n = this.splice(0, this.length );\n this.push(document.createElement('span'));\n this.append(x);\n }else if( isStr(n) )\n {\n n = this.$( n );\n n.remove();\n }\n const c = CssChain(n.content||n).clone(this);\n c.slot().forEach( s =>\n { const v = this.children.filter( n=>n.slot===s.name );\n v.length && setNodeHtml(s,v)\n });\n this.children.remove();\n this.forEach( (n,i)=> n.appendChild(c[i]))\n return this;\n }\n get innerText(){ return this.text() }\n set innerText( val ){ return this.text( val ) }\n text( val, css=undefined )\n { const arr = css? this.$(css): this;\n if( val === undefined )\n return collectionText( arr );\n arr.forEach( isFn(val)\n ? (n,i)=>setNodeText(n,val(n,i,arr))\n : n=>setNodeText(n,val) );\n return this\n }\n get outerHTML(){ return this.map( e=>e.outerHTML ).join('') }\n set outerHTML( val )\n { return this.forEach( (n,i,arr)=>\n { const p = n.parentNode;\n html2NodeArr(isFn(val) ? val(n,i,arr): val )\n .forEach( e=> p.insertBefore( (arr[i]=e), n));\n n.remove();\n })\n }\n get innerHTML(){ return this.html() }\n set innerHTML( val ){ return this.html(val) }\n html( val, css=undefined )\n { const arr = css? this.$(css): this;\n if( val === undefined )\n return collectionHtml( arr );\n arr.forEach( isFn(val)\n ? (n,i)=>setNodeHtml(n,val(n,i,arr))\n : n=>setNodeHtml(n,val) );\n return this\n }\n assignedElements(){ return CssChain([].concat( ...this.map( el=>el.assignedElements ? el.assignedElements():[] ) ) ) }\n assignedNodes(f){ return CssChain([].concat( ...this.map( el=>el.assignedNodes ? el.assignedNodes(f):[] ) ) ) }\n cloneNode(...args){ return this.map( el=>el.cloneNode && el.cloneNode(...args) ) }\n clone( /* number|array */count=1, cb=undefined )\n {\n let arr = count;\n if( isNum(count) )\n arr = Array.from({length: count}, (v, i) => i);\n\n if( isArr(arr) )\n { const ret = [];\n this.forEach( n => arr.forEach( (d,i) =>\n { const m = n.ownerDocument.importNode(n,true)\n , x = cb && cb( m, d, i, arr );\n isStr(x)\n ? ret.push( ...html2NodeArr(x) )\n : isArr(x)\n ? ret.push(...x)\n : ret.push( isNode(x) ? x : m )\n }));\n return CssChain( ret );\n }\n const doc = count;\n return this.map( el=> doc? doc.importNode( el,true ): el.cloneNode ? el.cloneNode(true):Object.assign({},el) )\n }\n get firstElementChild(){ return CssChain(this.map( n=>n.firstElementChild).filter(n=>n)) }\n get firstChild(){ return CssChain(this.map( n=>n.firstChild).filter(n=>n)) }\n get childNodes(){ return CssChain([].concat( ...map( this, el=>[...(el.childNodes || [] )] ) ) ) }\n get children(){ return CssChain([].concat( ...map( this, el=>[...(el.children || [] )] ) ) ) }\n}\n\nconst appliedTypes = new Set()\n, OBJ_prototype = Object.getPrototypeOf( {} );\n\n export function\napplyPrototype( nodeOrTag, ApiChain )\n{ const node = isStr(nodeOrTag) ? document.createElement(nodeOrTag) : nodeOrTag;\n if( appliedTypes.has(node.tagName) )\n return;\n appliedTypes.add( node.tagName );\n\n for( let k in node )\n if( !( k in ApiChain.prototype ) )\n setProp( node, k, ApiChain );\n\n for ( let proto; (proto= Object.getPrototypeOf(node)) !== OBJ_prototype && proto != null && !appliedTypes.has(proto) ; )\n { appliedTypes.add(proto);\n for( let k of Object.getOwnPropertyNames(proto) )\n if( !( k in ApiChain.prototype ) )\n setProp( node, k, ApiChain );\n }\n}\nObject.getOwnPropertyNames(window)\n .filter(key => key.startsWith('HTML') && key.endsWith('Element')&& key.length > 11 )\n .map( key=>key.substring(4,key.length-7).toLowerCase() )\n .forEach( tag=>applyPrototype( document.createElement(tag), CssChainLocal ) );\n\n export function\nCssChain( css, el=document, protoArr=[] )\n{\n const arr = 'string'===typeof css\n ? el.querySelectorAll( css )\n : isArr(css) ? css : [css? css.shadowRoot || css : document];\n\n if( isArr( protoArr ) )\n { if( !protoArr.length )\n protoArr = [...arr].slice(0,256);\n }else\n protoArr = [ protoArr ];\n\n protoArr.forEach( el => applyPrototype(el,CssChainLocal) );\n const ret = new CssChainLocal();\n ret.push(...arr);\n return ret;\n}\nexport default CssChain;\n"], - "mappings": "AAAA,wCACO,YAAM,KAAM,CAAC,KAAQ,IAAU,MAAM,UAAU,IAAI,MAAO,EAAK,GACzD,IAAM,CAAC,KAAQ,IAAU,IAAK,EAAK,GAAG,GAAO,KAAK,KAElD,eAAiB,GAAM,IAAI,EAAK,GAAG,YAAY,IAAI,KAAK,IAErE,KAAM,GAAM,IAAI,GACZ,EAAQ,GAAK,MAAM,QAAQ,GAC3B,EAAM,CAAC,EAAE,IAAM,MAAO,KAAM,EAC5B,EAAS,GAAK,EAAI,EAAG,UACrB,EAAS,GAAK,EAAI,EAAG,UACrB,EAAS,GAAK,EAAI,EAAG,YACrB,EAAS,GAAK,GAAK,EAAE,SACrB,EAAS,GAAK,EAAE,cAAc,KAC9B,EAAc,GAAI,EAAK,IAAM,EAAE,cAC/B,EAAO,CAAC,EAAK,IAAQ,GAAI,QAAQ,GAAI,GACrC,EAAQ,GAAK,EAAY,GACZ,EAAE,gBAAgB,QAAS,GAAK,EAAE,UAClC,EAAE,UAAU,GAEvB,EAAc,CAAI,EAAI,GAAG,EAAE,cACF,eAAe,EAAE,kBAAoB,eAAe,EAAE,YACtD,CAAE,SAAS,QAAQ,QAAQ,SAAS,WAAW,QAAQ,SACrD,UAAU,SAAS,QAAQ,WAC3B,SAAS,WAAW,WAAW,WAAW,SAC1C,SAAS,EAAE,UAAW,GAAK,EAAE,UACtC,EAAG,GAAG,EAAE,UACR,GAAG,GAAG,eAAe,EAAE,aAExC,YAAM,aAAc,GAAM,GAAU,EAAE,WAAa,GAAK,GAClD,YAAc,CAAE,EAAG,IAC5B,EAAY,GACV,EAAE,mBAAmB,QAAS,GAAK,EAAE,UAAY,GACjD,EAAE,UAAY,EACP,aAAe,CAAC,EAAI,IAAI,EAAI,IAAK,GAAG,EAAE,YAAY,IAClD,eAAiB,GAAO,IAAK,EAAK,GAAG,EAAE,iBACzC,IAAK,EAAE,mBAAoB,GAAG,EAAE,WAAY,KAAK,IACjD,EAAE,WACP,KAAK,IAEE,aAAe,GAC5B,CAAI,KAAM,GAAI,SAAS,cAAc,OACjC,EAAE,UAAY,EACd,KAAM,GAAa,GAAG,CAClB,GAAI,EAAE,WAAa,EACf,MAAO,GACX,KAAM,GAAI,SAAS,cAAc,QACjC,SAAE,OAAO,GACF,GAEX,MAAO,CAAC,GAAG,EAAE,YAAY,IAAI,GAAI,GAAE,SAAS,IAAI,IAAI,IAG3C,YAAc,CAAE,EAAG,IAChC,CACI,KAAM,GAAM,CAAE,EAAI,IAAQ,YAAa,MACb,EAAE,UAAY,EAAG,OAAO,GACxB,aAAa,GAAG,QAAS,GAAG,EAAG,OAAO,IAE7D,EAAS,GAAK,EAAY,GACZ,EAAE,OAAQ,GAAG,EAAE,gBACL,GAAG,aAAc,EAAM,aAAa,GAAI,GAAG,EAAE,KAAK,EAAE,MACjC,EAAE,cAAc,OAC7C,EAAI,EAAE,GAEvB,YAAe,WAAY,EAAM,GAC3B,CAAE,GAAG,GAAM,QAAS,GACpB,EAAO,IAEJ,YAAc,CAAE,EAAG,IAAS,CAAE,EAAM,GAAI,YAAY,EAAE,IAE/D,eACkB,MACtB,CACI,QAAQ,EAAK,CAAG,MAAO,GAAK,OAAO,EAAO,IAAK,GAAK,KAAK,EAAE,EAAK,IAAM,MAAO,aAAa,GAAG,GAAM,MAAQ,KAAK,aAAa,GAAG,GAChI,QAAQ,EAAK,CAAG,MAAO,GAAK,OAAO,EAAO,IAAK,GAAK,KAAK,EAAE,EAAK,IAAM,MAAO,QAAS,GAAI,EAAG,EAAK,IAAI,EAAK,IAAI,MAAQ,KAAK,GAAG,EAAK,IACpI,WAAY,EAAK,CAAE,aAAM,UAAU,QAAQ,MAAM,KAAK,GAAc,KACpE,OAAQ,EAAK,CAAE,MAAO,KAAI,KAAK,GAAG,GAClC,QAAQ,EAAK,CAAE,aAAM,UAAU,KAAK,MAAM,KAAK,GAAc,KAC7D,cAAc,EAAI,CAAE,MAAO,IAAI,KAAgB,KAAM,KAAK,iBAAiB,GAAK,IAChF,iBAAiB,EAAI,CAAE,MAAO,MAAK,OAAQ,CAAC,EAAE,IAAM,EAAE,KAAK,GAAI,GAAG,YAAY,GAAI,iBAAiB,IAAQ,GAAI,IAC/G,KAAK,EAAK,CAAE,MAAO,GAAK,OAAS,KAAK,iBAAiB,GAAG,GAAQ,KAClE,OAAO,EACP,CAAI,KAAM,GAAI,GAAI,KACZ,EAAM,GAAI,EAAE,IAAI,GAAK,EAAK,GAAE,IAAI,GAAI,GACpC,EAAa,GAAK,CAAI,KAAO,EAAE,EAAE,eACP,GAAI,EAAE,QAAQ,GACV,MAAO,GAAI,IAE3C,MAAO,UAAS,KAAK,IAAK,EAAM,EAAa,GAAG,EAAI,EAAE,gBAAiB,OAAO,GAAG,IAErF,MAAM,EAAK,CAAE,MAAO,MAAK,iBAAiB,GAAG,GAC7C,OAAO,EAAI,CAAE,MAAO,MAAK,QAAS,GAAI,YAAY,EAAE,IACpD,UAAU,EACV,CAAI,MAAK,GAAK,OAEH,EAAK,EAAK,IAAM,KAAK,oBAAoB,GAAG,GAAQ,KAAK,IAAI,GAAI,EAAG,QAAQ,EAAK,KAAK,OAAO,GAAI,GADhG,MAAK,QAAQ,GAAI,EAAG,UAAkB,GAAI,IAGtD,OAAO,CAAE,MAAO,MAAK,QAAQ,GAAG,EAAM,IACtC,QAAQ,EACR,CAAI,KAAM,GAAM,KAAK,IAAK,GAAG,EAAE,YAAc,GAAI,EAAG,EAAI,OAClC,IAAK,EAAI,GAAG,MAAM,KACd,GAAI,CAAC,KAAK,MAAM,SAAS,IAAM,CAAC,EAC1B,mBACA,cAAc,OAExB,QAClB,MAAI,GAAI,SAAW,EACf,GAAI,KAAM,EAAK,IACR,MAEJ,EAEX,SAAS,EACT,CACI,GAAI,IAAM,OACV,CAAI,KAAM,GAAK,KAAK,EAAE,UAAU,QAAQ,GAAG,EAAE,UACzC,EAAI,KAAK,OAAO,EAAG,KAAK,QACxB,KAAK,KAAK,SAAS,cAAc,SACjC,KAAK,OAAO,OACV,AAAI,GAAM,IAEZ,GAAI,KAAK,EAAG,GACZ,EAAE,UAEN,KAAM,GAAI,SAAS,EAAE,SAAS,GAAG,MAAM,MACvC,SAAE,OAAO,QAAS,GAClB,CAAI,KAAM,GAAI,KAAK,SAAS,OAAQ,GAAG,EAAE,OAAO,EAAE,MAC9C,EAAE,QAAU,YAAY,EAAE,KAE9B,KAAK,SAAS,SACd,KAAK,QAAS,CAAC,EAAE,IAAK,EAAE,YAAY,EAAE,KAC/B,QAEP,YAAW,CAAE,MAAO,MAAK,UACzB,WAAW,EAAK,CAAE,MAAO,MAAK,KAAM,GACxC,KAAM,EAAK,EAAI,OACf,CAAI,KAAM,GAAM,EAAK,KAAK,EAAE,GAAM,KAC9B,MAAI,KAAQ,OACD,eAAgB,GAC3B,GAAI,QAAS,EAAK,GACJ,CAAC,EAAE,IAAI,YAAY,EAAE,EAAI,EAAE,EAAE,IAC7B,GAAG,YAAY,EAAE,IACxB,SAEP,YAAW,CAAE,MAAO,MAAK,IAAK,GAAG,EAAE,WAAY,KAAK,OACpD,WAAW,EACf,CAAI,MAAO,MAAK,QAAS,CAAC,EAAE,EAAE,IAC1B,CAAI,KAAM,GAAI,EAAE,WACZ,aAAa,EAAK,GAAO,EAAI,EAAE,EAAE,GAAM,GAClC,QAAS,GAAI,EAAE,aAAe,EAAI,GAAG,EAAI,IAC9C,EAAE,cAGN,YAAW,CAAE,MAAO,MAAK,UACzB,WAAW,EAAK,CAAE,MAAO,MAAK,KAAK,GACvC,KAAM,EAAK,EAAI,OACf,CAAI,KAAM,GAAM,EAAK,KAAK,EAAE,GAAM,KAC9B,MAAI,KAAQ,OACD,eAAgB,GAC3B,GAAI,QAAS,EAAK,GACT,CAAC,EAAE,IAAI,YAAY,EAAE,EAAI,EAAE,EAAE,IAC7B,GAAG,YAAY,EAAE,IACnB,MAEX,kBAAkB,CAAE,MAAO,UAAS,GAAG,OAAQ,GAAG,KAAK,IAAK,GAAI,EAAG,iBAAmB,EAAG,mBAAmB,MAC5G,cAAc,EAAE,CAAE,MAAO,UAAS,GAAG,OAAQ,GAAG,KAAK,IAAK,GAAI,EAAG,cAAgB,EAAG,cAAc,GAAG,MACrG,aAAa,EAAK,CAAE,MAAO,MAAK,IAAK,GAAI,EAAG,WAAa,EAAG,UAAU,GAAG,IACzE,MAAyB,EAAM,EAAG,EAAG,OACrC,CACI,GAAI,GAAM,EAIV,GAHI,EAAM,IACN,GAAM,MAAM,KAAK,CAAC,OAAQ,GAAQ,CAAC,EAAG,IAAM,IAE5C,EAAM,GACV,CAAI,KAAM,GAAM,GACZ,YAAK,QAAS,GAAK,EAAI,QAAS,CAAC,EAAE,IACnC,CAAI,KAAM,GAAI,EAAE,cAAc,WAAW,EAAE,IACjC,EAAI,GAAM,EAAI,EAAG,EAAG,EAAG,GAC7B,EAAM,GACJ,EAAI,KAAM,GAAG,aAAa,IAC1B,EAAM,GACF,EAAI,KAAK,GAAG,GACZ,EAAI,KAAM,EAAO,GAAK,EAAI,MAE7B,SAAU,GAErB,KAAM,GAAM,EACZ,MAAO,MAAK,IAAK,GAAK,EAAK,EAAI,WAAY,EAAG,IAAQ,EAAG,UAAY,EAAG,UAAU,IAAM,OAAO,OAAO,GAAG,OAEzG,oBAAmB,CAAE,MAAO,UAAS,KAAK,IAAK,GAAG,EAAE,mBAAmB,OAAO,GAAG,OACjF,aAAY,CAAE,MAAO,UAAS,KAAK,IAAK,GAAG,EAAE,YAAY,OAAO,GAAG,OACnE,aAAY,CAAE,MAAO,UAAS,GAAG,OAAQ,GAAG,IAAK,KAAM,GAAI,CAAC,GAAI,EAAG,YAAc,UACjF,WAAU,CAAE,MAAO,UAAS,GAAG,OAAQ,GAAG,IAAK,KAAM,GAAI,CAAC,GAAI,EAAG,UAAY,QAGrF,KAAM,GAAe,GAAI,KACnB,EAAgB,OAAO,eAAgB,IAElC,+BACK,EAAW,EAC3B,CAAI,KAAM,GAAO,EAAM,GAAa,SAAS,cAAc,GAAa,EACpE,GAAI,GAAa,IAAI,EAAK,SAE1B,GAAa,IAAK,EAAK,SAEvB,OAAS,KAAK,GACV,AAAO,IAAK,GAAS,WACjB,EAAS,EAAM,EAAG,GAE1B,OAAU,GAAQ,GAAO,OAAO,eAAe,MAAW,GAAiB,GAAS,MAAQ,CAAC,EAAa,IAAI,IAC9G,CAAI,EAAa,IAAI,GACjB,OAAS,KAAK,QAAO,oBAAoB,GACrC,AAAO,IAAK,GAAS,WACjB,EAAS,EAAM,EAAG,KAGlC,OAAO,oBAAoB,QACtB,OAAO,GAAO,EAAI,WAAW,SAAW,EAAI,SAAS,YAAa,EAAI,OAAS,IAC/E,IAAK,GAAK,EAAI,UAAU,EAAE,EAAI,OAAO,GAAG,eACxC,QAAS,GAAK,eAAgB,SAAS,cAAc,GAAM,IAErD,yBACD,EAAK,EAAG,SAAU,EAAS,GACrC,CACI,KAAM,GAAM,AAAW,MAAO,IAAlB,SACE,EAAG,iBAAkB,GACrB,EAAM,GAAO,EAAM,CAAC,EAAK,EAAI,YAAc,EAAM,UAE/D,AAAI,EAAO,GACF,EAAS,QACV,GAAW,CAAC,GAAG,GAAK,MAAM,EAAE,MAEhC,EAAW,CAAE,GAEjB,EAAS,QAAS,GAAM,eAAe,EAAG,IAC1C,KAAM,GAAM,GAAI,GAChB,SAAI,KAAK,GAAG,GACL,EAEX,cAAe", - "names": [] -} diff --git a/dist/CssChainElement.js b/dist/CssChainElement.js deleted file mode 100644 index da23a2a..0000000 --- a/dist/CssChainElement.js +++ /dev/null @@ -1,6 +0,0 @@ -import e from"./CssChain.js";export class CssChainElement extends HTMLElement{constructor(){super();this.title="Hey there",this.counter=0;const t=document.createElement("div");t.innerHTML=this.template,this.attachShadow({mode:"open"}).appendChild(t),this.$("button").addEventListener("click",()=>this.__increment())}get template(){return` - • -
- -`}$(...t){return e(this.shadowRoot).$(...t)}__increment(){const t=this.$().slot().text();this.$("b").innerHTML+=`${t}`,this.counter=this.$("input").value=this.$("span").length}} -//# sourceMappingURL=CssChainElement.js.map diff --git a/dist/CssChainElement.js.map b/dist/CssChainElement.js.map deleted file mode 100644 index 33b45a2..0000000 --- a/dist/CssChainElement.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../src/CssChainElement.js"], - "sourcesContent": ["import $ from './CssChain.js';\n\n export class\nCssChainElement extends HTMLElement\n{\n constructor()\n {\n super();\n this.title = 'Hey there';\n this.counter = 0;\n\n const t = document.createElement('div');\n t.innerHTML = this.template;\n\n this.attachShadow({mode: 'open'}).appendChild(t);\n this.$('button').addEventListener('click', ()=>this.__increment() );\n }\n\n get template()\n { return `\n •\n
\n\n`\n }\n\n $( ...arr ){ return $( this.shadowRoot ).$(...arr); }\n\n __increment()\n { const slotContent = this.$().slot().text();\n this.$('b').innerHTML += `${ slotContent }`;\n this.counter = this.$('input').value = this.$('span').length;\n }\n}\n"], - "mappings": "AAAA,6BAEW,oCACa,YACxB,CACI,aACA,CACI,QACA,KAAK,MAAQ,YACb,KAAK,QAAU,EAEf,KAAM,GAAI,SAAS,cAAc,OACjC,EAAE,UAAY,KAAK,SAEnB,KAAK,aAAa,CAAC,KAAM,SAAS,YAAY,GAC9C,KAAK,EAAE,UAAU,iBAAiB,QAAS,IAAI,KAAK,kBAGpD,WACJ,CAAI,MAAO;AAAA;AAAA;AAAA;AAAA,EAOX,KAAM,EAAK,CAAE,MAAO,GAAG,KAAK,YAAa,EAAE,GAAG,GAE9C,aACA,CAAI,KAAM,GAAc,KAAK,IAAI,OAAO,OACpC,KAAK,EAAE,KAAK,WAAa,SAAU,WACnC,KAAK,QAAU,KAAK,EAAE,SAAS,MAAQ,KAAK,EAAE,QAAQ", - "names": [] -} diff --git a/dist/PokeApi-Explorer.js b/dist/PokeApi-Explorer.js deleted file mode 100644 index c5b03be..0000000 --- a/dist/PokeApi-Explorer.js +++ /dev/null @@ -1,19 +0,0 @@ -var w=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var x=(s,e)=>{var l={};for(var n in s)A.call(s,n)&&e.indexOf(n)<0&&(l[n]=s[n]);if(s!=null&&w)for(var n of w(s))e.indexOf(n)<0&&P.call(s,n)&&(l[n]=s[n]);return l};import B from"https://unpkg.com/slotted-element@1.0.3/fetch-element.js";import{CssChain as u}from"https://unpkg.com/css-chain@1/CssChain.js";const f=(s,e,l="")=>s.map(e).join(l),k=s=>s&&s.endsWith&&["png","gif","svg"].find(e=>s.endsWith(e));window.customElements.define("pokemon-link-element",class extends HTMLElement{connectedCallback(){const e=u(this),l=t=>e.$(t),n=e.attr("name"),p=e.attr("url");if(k(p)){debugger;return e.html(``)}e.html(`${n}
`),l("a").on("click",async t=>{if(t.preventDefault(),this.loaded)return l("dl").clear(),this.loaded=0;this.loaded=1;const r=await(await fetch(p)).json();l("dl").html(m(r))});function m(t,r=""){if(t==null||typeof t=="string"||typeof t=="number")return k(t)?``:r?`${r} : ${t}`:`${t}`;if(Array.isArray(t))return`
${r}${f(t,m,"
")}
`;let o=[],i=Object.keys(t);const $=t.name&&t.url&&k(t.url)?``:` `;if(i.length===2&&t.name&&t.url)o.push($);else{r&&(o.push("
"),o.push(`${r}`));for(let a in t)switch(a){case"name":if(t.url)break;case"url":t.url&&t.name&&o.push($);break;default:Array.isArray(t[a])?o.push(`
${a}${f(t[a],d=>m(d),"
")}
`):o.push(m(t[a],a))}r&&o.push("
")}return o.join("")}}}),window.customElements.define("pokemon-info-element",class extends B{render(e){const o=e.sprites,{other:l,versions:n}=o,p=x(o,["other","versions"]),m=(i,$)=>`
${i} - ${f(Object.entries($),([a,d])=>d?typeof d=="string"?``:m(a,d):"")}
`,t=()=>`
abilities - ${f(e.abilities,i=>`${i.ability.name}${i.slot}`)}
`,r=(i,$)=>`
${i}${f($,a=>``)}
`;return`

${e.name}

- -
- ${r("abilities",e.abilities.map(i=>i.ability))} - ${r("forms",e.forms)} - ${r("game indices",e.game_indices.map(i=>i.version))} - ${r("moves",e.moves.map(i=>i.move))} - ${r("stats",e.stats.map(i=>i.stat))} - ${r("types",e.types.map(i=>i.type))} - ${r("species",[e.species])} -
- ${m("Sprites",p)} - ${m("other",l)} - ${m("versions",n)} - `}});let c=0,h=10;const C=async()=>(await fetch(`https://pokeapi.co/api/v2/pokemon?limit=${h}&offset=${c}`)).json(),E=u(),y=async s=>u("pokemon-info-element").attr("src",s.url),I=s=>(e=>(e.pop(),e.pop()))(s.url.split("/")),j=s=>`https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world/${I(s)}.svg`,g=E.slot("slot-select"),b=g.parent().$("dl"),v=async()=>{const s=await C();return b.clear(),c?b.append(g.clone(s.results,(e,l,n)=>u(e).prop("hidden",!1).prop("checked",!n,"input").prop("src",j(l),"img").on("click",()=>y(l)).slot("index",c+n).slot("name",l.name))):s.results.forEach((e,l)=>{const n=g.clone();n.hidden=!1,n.$("input").checked=!l,n.slot("index").innerText=c+l,n.slot("name").innerText=e.name,n.on("click",()=>y(e)),n.$("img").src=j(e),b.append(n)}),y(s.results[0]),prevBtn.disabled=c<=0,nextBtn.disabled=c+h>=s.count,s};g.remove();const L=await v();E.slot("counter").text(L.count),prevBtn.onclick=()=>v(c-=h),nextBtn.onclick=()=>v(c+=h); -//# sourceMappingURL=PokeApi-Explorer.js.map diff --git a/dist/PokeApi-Explorer.js.map b/dist/PokeApi-Explorer.js.map deleted file mode 100644 index 50b5d72..0000000 --- a/dist/PokeApi-Explorer.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../src/PokeApi-Explorer.js"], - "sourcesContent": ["import FetchElement from 'https://unpkg.com/slotted-element@1.0.3/fetch-element.js';\nimport { CssChain as $$ } from \"https://unpkg.com/css-chain@1/CssChain.js\";\n// import { CssChain as $$ } from \"./CssChain.js\";\n\nconst arr2str = (arr,cb, separator='') => arr.map(cb).join(separator)\n, isImg = url => url && url.endsWith && ['png','gif','svg'].find( x=>url.endsWith(x) );\n\nwindow.customElements.define('pokemon-link-element',\n class PokemonInfoElement extends HTMLElement\n {\n connectedCallback()\n {\n const $this = $$(this)\n , $ = x => $this.$(x)\n , name = $this.attr('name')\n , url = $this.attr('url');\n if( isImg(url) )\n {\n debugger;\n return $this.html( `` );\n }\n\n\n $this.html(`${name}
`);\n\n $('a').on('click', async e=>\n { e.preventDefault();\n if(this.loaded)\n return $('dl').clear(), this.loaded=0;\n this.loaded =1;\n const d = await ( await fetch(url) ).json();\n $('dl').html( render(d) );\n });\n\n function render( d, n='' )\n {\n if( d === undefined || d === null || 'string' === typeof d || 'number' === typeof d )\n { if( isImg(d) )\n return ``;\n return n ? `${ n } : ${ d }` : `${ d }`;\n }\n if( Array.isArray( d ))\n return `
${n}${ arr2str( d, render,'
' ) }
`;\n\n let ret = [], keys = Object.keys(d);\n const link = ( d.name && d.url ) && isImg(d.url)\n ? ``\n : ` `;\n\n if( keys.length ===2 && d.name && d.url )\n ret.push( link )\n else\n { if( n )\n { ret.push( '
' );\n ret.push( `${ n }` )\n }\n for( let k in d )\n switch( k )\n { case 'name':\n if( d.url )\n break;\n case 'url':\n d.url && d.name && ret.push( link ); break;\n default:\n if( Array.isArray( d[ k ] ) )\n ret.push( `
${ k }${\n arr2str( d[ k ], v=>render(v),'
' )\n }
` );\n else\n ret.push( render( d[ k ], k ) );\n }\n n && ret.push( '
' );\n }\n return ret.join('')\n }\n }\n\n });\n\n\nwindow.customElements.define('pokemon-info-element',\n class PokemonInfoElement extends FetchElement\n {\n render(pokemon)\n {\n const { other, versions, ...sprites } = pokemon.sprites;\n const renderCollection = (title, obj) => `
${title}\n ${ arr2str( Object.entries(obj), ([k,v]) => !v ? ''\n : ('string' === typeof v\n ? ``\n : renderCollection(k,v) ) )\n }
`;\n const renderAbilities = () => `
abilities\n ${ arr2str( pokemon.abilities, a => `${a.ability.name}${a.slot}` )\n }
`;\n const nameUrlArr = (name,arr)=>`
${name}${\n arr2str(arr, a => `` )\n }
`;\n\n\n return `

${ pokemon.name }

\n \"\"\n
\n ${nameUrlArr('abilities',pokemon.abilities.map(a=>a.ability))}\n ${nameUrlArr('forms',pokemon.forms)}\n ${nameUrlArr('game indices',pokemon.game_indices.map(i=>i.version))}\n ${nameUrlArr('moves',pokemon.moves.map(i=>i.move))}\n ${nameUrlArr('stats',pokemon.stats.map(i=>i.stat))}\n ${nameUrlArr('types',pokemon.types.map(i=>i.type))}\n ${nameUrlArr('species',[pokemon.species])}\n
\n ${ renderCollection('Sprites' ,sprites ) }\n ${ renderCollection('other' ,other ) }\n ${ renderCollection('versions' ,versions ) }\n `;\n }\n });\n\nlet offset = 0\n, limit = 10;\nconst getPokeList = async () =>\n ( await\n // fetch( '../test/pokeapi-page0.json')\n fetch( `https://pokeapi.co/api/v2/pokemon?limit=${limit}&offset=${offset}`)\n ).json()\n, $ = $$()\n, onSelected = async (p) => $$('pokemon-info-element').attr( 'src', p.url )\n, getPokemonId = p=> ( arr=>(arr.pop(), arr.pop()) )( p.url.split('/') )\n, getImgByPokemon = p =>`https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world/${getPokemonId(p)}.svg`\n, $template = $.slot('slot-select')\n, $listContainer = $template.parent().$('dl')\n, renderList = async()=>\n {\n const page = await getPokeList();\n\n $listContainer.clear();\n // yield version\n\n if( offset ) // call chain with callbacks version\n $listContainer.append(\n $template.clone( page.results, (cloned, p,i)=>\n $$(cloned)\n .prop('hidden', false )\n .prop('checked', !i, 'input')\n .prop('src', getImgByPokemon( p ), 'img')\n .on('click', ()=>onSelected(p) )\n .slot( 'index', offset + i )\n .slot( 'name', p.name ) ) );\n else // same without call chain, just as show case of HTMLElement API in CssChain\n page.results.forEach( (p,i)=>\n {\n const $c = $template.clone();\n $c.hidden = false;\n $c.$('input').checked = !i;\n $c.slot( 'index' ).innerText = offset + i;\n $c.slot( 'name' ).innerText = p.name;\n $c.on('click', ()=>onSelected(p) )\n $c.$('img').src = getImgByPokemon( p );\n $listContainer.append($c);\n });\n\n onSelected( page.results[0] );\n\n prevBtn.disabled = offset <= 0;\n nextBtn.disabled = offset+limit >= page.count;\n return page;\n };\n$template.remove();\nconst firstPage = await renderList()\n$.slot('counter').text( firstPage.count );\nprevBtn.onclick = ()=> renderList( offset-=limit );\nnextBtn.onclick = ()=> renderList( offset+=limit );\n"], - "mappings": "mRAAA,wEACA,qEAGA,KAAM,GAAU,CAAC,EAAI,EAAI,EAAU,KAAO,EAAI,IAAI,GAAI,KAAK,GACvD,EAAQ,GAAO,GAAO,EAAI,UAAY,CAAC,MAAM,MAAM,OAAO,KAAM,GAAG,EAAI,SAAS,IAEpF,OAAO,eAAe,OAAO,uBACzB,aAAiC,YACjC,CACI,mBACA,CACI,KAAM,GAAQ,EAAG,MACb,EAAI,GAAK,EAAM,EAAE,GACf,EAAO,EAAM,KAAK,QACjB,EAAM,EAAM,KAAK,OACxB,GAAI,EAAM,GACV,CACI,SACA,MAAO,GAAM,KAAM,eAAgB,WAAgB,OAIvD,EAAM,KAAK,YAAY,MAAQ,kBAE/B,EAAE,KAAK,GAAG,QAAS,KAAM,IACzB,CACI,GADA,EAAE,iBACC,KAAK,OACJ,MAAO,GAAE,MAAM,QAAS,KAAK,OAAO,EACxC,KAAK,OAAQ,EACb,KAAM,GAAI,KAAQ,MAAM,OAAM,IAAO,OACrC,EAAE,MAAM,KAAM,EAAO,MAGzB,WAAiB,EAAG,EAAE,GACtB,CACI,GAAI,AAAmB,GAAM,MAAQ,AAAa,MAAO,IAApB,UAAyB,AAAa,MAAO,IAApB,SAC1D,MAAI,GAAM,GACC,eAAe;AAAA,EAAM,WAAW,MACpC,EAAI,eAAgB,mBAAqB,iBAAoB,QAAS,UAEjF,GAAI,MAAM,QAAS,GACf,MAAO,qBAAqB,aAAe,EAAS,EAAG,EAAO,sBAElE,GAAI,GAAM,GAAI,EAAO,OAAO,KAAK,GACjC,KAAM,GAAS,EAAE,MAAQ,EAAE,KAAS,EAAM,EAAE,KACnC,eAAe,WAAc,OAC7B,+BAA+B,EAAE,cAAc,EAAE,gCAE1D,GAAI,EAAK,SAAU,GAAK,EAAE,MAAQ,EAAE,IAChC,EAAI,KAAM,OAEd,CAAI,AAAI,GACA,GAAI,KAAM,cACV,EAAI,KAAM,WAAY,eAE1B,OAAS,KAAK,GACV,OAAQ,OACC,OACD,GAAI,EAAE,IACF,UACH,MACD,EAAE,KAAO,EAAE,MAAQ,EAAI,KAAM,GAAQ,cAErC,AAAI,MAAM,QAAS,EAAG,IAClB,EAAI,KAAM,qBAAsB,aAC5B,EAAS,EAAG,GAAK,GAAG,EAAO,GAAG,uBAGlC,EAAI,KAAM,EAAQ,EAAG,GAAK,IAE1C,GAAK,EAAI,KAAM,eAEnB,MAAO,GAAI,KAAK,QAOhC,OAAO,eAAe,OAAO,uBACzB,aAAiC,EACjC,CACI,OAAO,EACP,CACI,KAAwC,KAAQ,QAAxC,SAAO,YAAyB,EAAZ,IAAY,EAAZ,CAApB,QAAO,aACT,EAAmB,CAAC,EAAO,IAAS,qBAAqB;AAAA,kBACvD,EAAS,OAAO,QAAQ,GAAM,CAAC,CAAC,EAAE,KAAO,AAAC,EAChC,AAAa,MAAO,IAApB,SACE,aAAa,aAAa,OAC1B,EAAiB,EAAE,GAHe,iBAKhD,EAAkB,IAAO;AAAA,kBACvB,EAAS,EAAQ,UAAW,GAAK,YAAY,EAAE,QAAQ,QAAQ,EAAE,QAAQ,gBAAgB,EAAE,2BAE7F,EAAa,CAAC,EAAK,IAAM,qBAAqB,cACxC,EAAQ,EAAK,GAAK,8BAA8B,EAAE,cAAc,EAAE,6CAI9E,MAAO,OAAQ,EAAQ;AAAA,gCACF,6EAA6E,EAAQ;AAAA;AAAA,0BAE5F,EAAW,YAAY,EAAQ,UAAU,IAAI,GAAG,EAAE;AAAA,0BAClD,EAAW,QAAQ,EAAQ;AAAA,0BAC3B,EAAW,eAAe,EAAQ,aAAa,IAAI,GAAG,EAAE;AAAA,0BACxD,EAAW,QAAQ,EAAQ,MAAM,IAAI,GAAG,EAAE;AAAA,0BAC1C,EAAW,QAAQ,EAAQ,MAAM,IAAI,GAAG,EAAE;AAAA,0BAC1C,EAAW,QAAQ,EAAQ,MAAM,IAAI,GAAG,EAAE;AAAA,0BAC1C,EAAW,UAAU,CAAC,EAAQ;AAAA;AAAA,sBAEjC,EAAiB,UAAa;AAAA,sBAC9B,EAAiB,QAAa;AAAA,sBAC9B,EAAiB,WAAa;AAAA,yBAKrD,GAAI,GAAS,EACT,EAAQ,GACZ,KAAM,GAAc,SACb,MAEC,OAAO,2CAA2C,YAAgB,MACpE,OACF,EAAI,IACJ,EAAa,KAAO,IAAM,EAAG,wBAAwB,KAAM,MAAO,EAAE,KACpE,EAAe,GAAM,IAAM,GAAI,MAAO,EAAI,QAAU,EAAE,IAAI,MAAM,MAChE,EAAkB,GAAI,6EAA6E,EAAa,SAChH,EAAY,EAAE,KAAK,eACnB,EAAiB,EAAU,SAAS,EAAE,MACtC,EAAa,SACb,CACI,KAAM,GAAO,KAAM,KAEnB,SAAe,QAGf,AAAI,EACA,EAAe,OACX,EAAU,MAAO,EAAK,QAAS,CAAC,EAAQ,EAAE,IACzC,EAAG,GACK,KAAK,SAAU,IACf,KAAK,UAAW,CAAC,EAAG,SACpB,KAAK,MAAO,EAAiB,GAAK,OAClC,GAAG,QAAS,IAAI,EAAW,IAC3B,KAAM,QAAS,EAAS,GACxB,KAAM,OAAQ,EAAE,QAE7B,EAAK,QAAQ,QAAS,CAAC,EAAE,IACzB,CACI,KAAM,GAAK,EAAU,QACrB,EAAG,OAAS,GACZ,EAAG,EAAE,SAAS,QAAU,CAAC,EACzB,EAAG,KAAM,SAAU,UAAY,EAAS,EACxC,EAAG,KAAM,QAAS,UAAY,EAAE,KAChC,EAAG,GAAG,QAAS,IAAI,EAAW,IAC9B,EAAG,EAAE,OAAO,IAAM,EAAiB,GACnC,EAAe,OAAO,KAG9B,EAAY,EAAK,QAAQ,IAEzB,QAAQ,SAAW,GAAU,EAC7B,QAAQ,SAAW,EAAO,GAAS,EAAK,MACjC,GAEf,EAAU,SACV,KAAM,GAAY,KAAM,KACxB,EAAE,KAAK,WAAW,KAAM,EAAU,OAClC,QAAQ,QAAU,IAAK,EAAY,GAAQ,GAC3C,QAAQ,QAAU,IAAK,EAAY,GAAQ", - "names": [] -} diff --git a/dist/css-chain-element.js b/dist/css-chain-element.js deleted file mode 100644 index b94c215..0000000 --- a/dist/css-chain-element.js +++ /dev/null @@ -1,2 +0,0 @@ -import{CssChainElement as e}from"./CssChainElement.js";window.customElements.define("css-chain",e);export default e; -//# sourceMappingURL=css-chain-element.js.map diff --git a/dist/css-chain-element.js.map b/dist/css-chain-element.js.map deleted file mode 100644 index 77dfde9..0000000 --- a/dist/css-chain-element.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../src/css-chain-element.js"], - "sourcesContent": ["import { CssChainElement } from './CssChainElement.js';\n\nwindow.customElements.define( 'css-chain', CssChainElement);\n\nexport default CssChainElement;\n"], - "mappings": "AAAA,uDAEA,OAAO,eAAe,OAAQ,YAAa,GAE3C,cAAe", - "names": [] -} diff --git a/dist/demo.html b/dist/demo.html deleted file mode 100644 index 4cec2b0..0000000 --- a/dist/demo.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - css-chain demo - - - - - -

Working demo of CssChain

-
- git - GitHub - -| test coverage -| Working with slots -| PokéAPI Explorer -| light DOM templates & slots -
- -

In order to use SccChain within web component, declare the $ method in class:

- - - - - -

Then this.$(css) is available for accessing the DOM like in sample.

- - - - - 🍦 - 🌼 - -
- - - diff --git a/dist/slots-in-shadow.js b/dist/slots-in-shadow.js deleted file mode 100644 index 58419d6..0000000 --- a/dist/slots-in-shadow.js +++ /dev/null @@ -1,29 +0,0 @@ -import{CssChain as e}from"./CssChain.js";const s=` - out of slot - - - default slot -
inner 1
-
- inner 2 -
inner 1 in 2
-
inner 2 in 2
-
-
-
-

- prefix - - outer slot - \n \n suffix\n

\n`;\nclass SlotsInShadowDemo extends HTMLElement\n{\n constructor()\n { super();\n let template = document.createElement('template');\n template.innerHTML = templateStr;\n this.attachShadow({mode: 'open'}).appendChild(template.content);\n this.$ = css => css ? $$(css,this.shadowRoot) : $$(this.shadowRoot);\n }\n}\nwindow.customElements.define( 'slots-in-shadow', SlotsInShadowDemo);\n"], - "mappings": "AAAA,yCAEA,KAAM,GAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4BlB,eAAgC,YAChC,CACI,aACA,CAAI,QACA,GAAI,GAAW,SAAS,cAAc,YACtC,EAAS,UAAY,EACrB,KAAK,aAAa,CAAC,KAAM,SAAS,YAAY,EAAS,SACvD,KAAK,EAAI,GAAO,EAAO,EAAG,EAAI,KAAK,YAAc,EAAG,KAAK,aAGjE,OAAO,eAAe,OAAQ,kBAAmB", - "names": [] -} diff --git a/dist/slots-light-vs-shadow.js b/dist/slots-light-vs-shadow.js deleted file mode 100644 index d7c6b40..0000000 --- a/dist/slots-light-vs-shadow.js +++ /dev/null @@ -1,2 +0,0 @@ -import{CssChain as l}from"./CssChain.js";export function createTestTree(o){let i={light:{}};function a(e){let t=e.parentNode;t.removeChild(e);let d;e.getAttribute("data-slot-assignment")==="manual"?d=t.attachShadow({mode:e.getAttribute("data-mode"),slotAssignment:"manual"}):d=t.attachShadow({mode:e.getAttribute("data-mode")});let r=e.id;return r&&(d.id=r,i[r]=d),d.appendChild(document.importNode(e.content,!0)),d}function n(e){e.id&&(i[e.id]=e);for(let t of Array.from(e.querySelectorAll("[id]")))i[t.id]=t;for(let t of Array.from(e.querySelectorAll("template")))n(a(t))}function h(e){e.id&&(i.light[e.id]=e),l("[id]",e).map(t=>i.light[t.id]=t),l("template",e).map(t=>{const d=t.parentNode;d.removeChild(t),l(d).template(t),h(d)})}const s=(e,t)=>{let d=o.cloneNode(!0);return d.id="",d.classList.add(t),t==="light"?i.light[o.id]=d:i[o.id]=d,e.parentNode.appendChild(d),d};return n(s(o,"shadow")),h(s(o,"light")),i}export function removeWhiteSpaceOnlyTextNodes(o){for(var i=0;i ids.light[ e.id ] = e );\n\n $( 'template', root )\n .map( t =>\n { const p = t.parentNode;\n p.removeChild(t);\n $(p).template(t);\n walkLightDom( p );\n });\n }\n\n const cloneAppend = (n,classname) =>\n { let x = node.cloneNode( true );\n x.id='';\n x.classList.add(classname);\n if( classname==='light')\n ids.light[node.id]=x;\n else\n ids[node.id]=x;\n n.parentNode.appendChild(x);\n return x\n };\n\n walkShadowDom( cloneAppend( node,'shadow' ) );\n walkLightDom( cloneAppend( node ,'light' ) );\n\n return ids;\n}\n\n// https://github.com/chromium/chromium/blob/main/third_party/blink/web_tests/external/wpt/shadow-dom/resources/shadow-dom.js#L1\nexport function removeWhiteSpaceOnlyTextNodes(node)\n{\n for (var i = 0; i < node.childNodes.length; i++) {\n var child = node.childNodes[i];\n if (child.nodeType === Node.TEXT_NODE && child.nodeValue.trim().length == 0) {\n node.removeChild(child);\n i--;\n } else if (child.nodeType === Node.ELEMENT_NODE || child.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n removeWhiteSpaceOnlyTextNodes(child);\n }\n }\n if (node.shadowRoot) {\n removeWhiteSpaceOnlyTextNodes(node.shadowRoot);\n }\n}\n"], - "mappings": "AAIA,yCAOO,+BAAyB,EAChC,CAEI,GAAI,GAAM,CAAC,MAAM,IAEjB,WAAmC,EACnC,CACI,GAAI,GAAS,EAAS,WACtB,EAAO,YAAa,GACpB,GAAI,GACJ,AAAI,EAAS,aAAc,0BAA6B,SAEpD,EACI,EAAO,aAAc,CACjB,KAAM,EAAS,aAAc,aAC7B,eAAgB,WAIxB,EAAa,EAAO,aAChB,CAAE,KAAM,EAAS,aAAc,eAEvC,GAAI,GAAK,EAAS,GAElB,MAAI,IAEA,GAAW,GAAK,EAChB,EAAK,GAAO,GAEhB,EAAW,YAAa,SAAS,WAAY,EAAS,QAAS,KACxD,EAGX,WAAwB,EACxB,CACI,AAAI,EAAK,IAEL,GAAK,EAAK,IAAO,GAErB,OAAS,KAAK,OAAM,KAAM,EAAK,iBAAkB,SAE7C,EAAK,EAAE,IAAO,EAElB,OAAS,KAAK,OAAM,KAAM,EAAK,iBAAkB,aAE7C,EAAe,EAA0B,IAIjD,WAAuB,EACvB,CAAI,AAAI,EAAK,IACL,GAAI,MAAO,EAAK,IAAO,GAE3B,EAAG,OAAO,GAAO,IAAK,GAAK,EAAI,MAAO,EAAE,IAAO,GAE/C,EAAG,WAAY,GACV,IAAK,GACN,CAAI,KAAM,GAAI,EAAE,WACZ,EAAE,YAAY,GACd,EAAE,GAAG,SAAS,GACd,EAAc,KAI1B,KAAM,GAAc,CAAC,EAAE,IACvB,CAAI,GAAI,GAAI,EAAK,UAAW,IACxB,SAAE,GAAG,GACL,EAAE,UAAU,IAAI,GAChB,AAAI,IAAY,QACZ,EAAI,MAAM,EAAK,IAAI,EAEnB,EAAI,EAAK,IAAI,EACjB,EAAE,WAAW,YAAY,GAClB,GAGX,SAAe,EAAa,EAAK,WACjC,EAAc,EAAa,EAAM,UAE1B,EAIJ,8CAAuC,EAC9C,CACI,OAAS,GAAI,EAAG,EAAI,EAAK,WAAW,OAAQ,IAAK,CAC7C,GAAI,GAAQ,EAAK,WAAW,GAC5B,AAAI,EAAM,WAAa,KAAK,WAAa,EAAM,UAAU,OAAO,QAAU,EACtE,GAAK,YAAY,GACjB,KACO,GAAM,WAAa,KAAK,cAAgB,EAAM,WAAa,KAAK,yBACvE,8BAA8B,GAGtC,AAAI,EAAK,YACL,8BAA8B,EAAK", - "names": [] -} diff --git a/package-lock.json b/package-lock.json index 1c17e98..110054c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,8 @@ "@open-wc/testing": "^3.0.3", "@web/dev-server": "^0.1.29", "@web/test-runner": "^0.13.25", - "esbuild": "^0.14.11" + "esbuild": "^0.14.11", + "typescript": "^4.5.5" } }, "node_modules/@babel/code-frame": { @@ -3563,6 +3564,19 @@ "node": ">= 0.6" } }, + "node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/typical": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", @@ -6543,6 +6557,12 @@ "mime-types": "~2.1.24" } }, + "typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true + }, "typical": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", diff --git a/package.json b/package.json index d6c647f..94a6333 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "version": "1.0.13", "browser": "index.js", "module": "index.js", + "type": "module", + "types": "src/CssChain.d.ts", "exports": { ".": "index.js" }, @@ -36,7 +38,8 @@ "@open-wc/testing": "^3.0.3", "@web/dev-server": "^0.1.29", "@web/test-runner": "^0.13.25", - "esbuild": "^0.14.11" + "esbuild": "^0.14.11", + "typescript": "^4.5.5" }, "customElements": "custom-elements.json" } diff --git a/src/CssChainElement.js b/src/CssChainElement.js index b7ca0b5..d7e6d42 100644 --- a/src/CssChainElement.js +++ b/src/CssChainElement.js @@ -27,7 +27,7 @@ CssChainElement extends HTMLElement $( ...arr ){ return $( this.shadowRoot ).$(...arr); } __increment() - { const slotContent = this.$().slot().text(); + { const slotContent = this.$().slot().txt(); this.$('b').innerHTML += `${ slotContent }`; this.counter = this.$('input').value = this.$('span').length; } diff --git a/src/PokeApi-Explorer.js b/src/PokeApi-Explorer.js index 0a777fe..f2dcd5e 100644 --- a/src/PokeApi-Explorer.js +++ b/src/PokeApi-Explorer.js @@ -26,7 +26,7 @@ window.customElements.define('pokemon-link-element', $('a').on('click', async e=> { e.preventDefault(); if(this.loaded) - return $('dl').clear(), this.loaded=0; + return $('dl').empty(), this.loaded=0; this.loaded =1; const d = await ( await fetch(url) ).json(); $('dl').html( render(d) ); @@ -133,7 +133,7 @@ const getPokeList = async () => { const page = await getPokeList(); - $listContainer.clear(); + $listContainer.empty(); // yield version if( offset ) // call chain with callbacks version @@ -167,6 +167,6 @@ const getPokeList = async () => }; $template.remove(); const firstPage = await renderList() -$.slot('counter').text( firstPage.count ); +$.slot('counter').txt( firstPage.count ); prevBtn.onclick = ()=> renderList( offset-=limit ); nextBtn.onclick = ()=> renderList( offset+=limit ); diff --git a/src/slots-light-vs-shadow.html b/src/slots-light-vs-shadow.html index 922b4c7..4a8e12c 100644 --- a/src/slots-light-vs-shadow.html +++ b/src/slots-light-vs-shadow.html @@ -347,8 +347,8 @@

{ - const lightText = $($(test_basic).parent().$('.light #host')[0] ).text().replace( /\s+/g ,' ').trim(); - const shadowText = $($(test_basic).parent().$('.shadow #host').shadowRoot).text().replace( /\s+/g ,' ').trim(); + const lightText = $($(test_basic).parent().$('.light #host')[0] ).txt().replace( /\s+/g ,' ').trim(); + const shadowText = $($(test_basic).parent().$('.shadow #host').shadowRoot).txt().replace( /\s+/g ,' ').trim(); expect(lightText).to.equal(shadowText); expect(lightText).to.equal('before slot slot1 override after slot'); @@ -367,7 +367,7 @@

{ expect($(test_basic_closed).parent().$('.shadow #host').shadowRoot).to.equal(null);// closed shadow mode makes shadowRoot not available by JS - const lightText = $($(test_basic_closed).parent().$('.light #host')[0] ).text().replace( /\s+/g ,' ').trim(); + const lightText = $($(test_basic_closed).parent().$('.light #host')[0] ).txt().replace( /\s+/g ,' ').trim(); expect(lightText).to.equal('before slot slot1 override after slot'); }); test(() => { @@ -449,16 +449,16 @@

{ let n = createTestTree(test_no_direct_host_child); @@ -478,8 +478,8 @@

{ let n = createTestTree(test_default_slot); @@ -499,8 +499,8 @@

{ let n = createTestTree(test_slot_in_slot); @@ -518,8 +518,8 @@

{ let n = createTestTree(test_slot_is_assigned_to_slot); @@ -543,8 +543,8 @@

{ let n = createTestTree(test_open_closed); @@ -574,8 +574,8 @@

{ let n = createTestTree(test_closed_closed); @@ -597,7 +597,7 @@

closed as DOM is not available for JS const light = $(test_open_closed).parent().$('.light' ); - expect( light.$('#host1').text() ).to.equal( '#c1' ); + expect( light.$('#host1').txt() ).to.equal( '#c1' ); }); test(() => { let n = createTestTree(test_closed_open); @@ -618,7 +618,7 @@

open as DOM is not available for JS const light = $(test_closed_open).parent().$('.light' ); - expect( light.$('#host1').text() ).to.equal( '#c1' ); + expect( light.$('#host1').txt() ).to.equal( '#c1' ); }); test(() => { let n = createTestTree(test_complex); @@ -741,9 +741,9 @@

{ let n = createTestTree(test_complex); diff --git a/src/slots.html b/src/slots.html index 35a75b8..2f12873 100644 --- a/src/slots.html +++ b/src/slots.html @@ -77,8 +77,8 @@

Visual presentation of Slot in shadow DOM from unit test

+ slots2innerText.$().slot().txt( (s,i)=>`B${i}`)"> + $().slot().txt( (s,i)=›`B${i}`) 🎨
+ + slots2innerText.$().slots().txt( (s,i)=>`B${i}`)"> + $().slots().txt( (s,i)=›`B${i}`) 🎨 + + slots2innerHTML.$().slots().html( (s,i)=>`B${i}`)"> + $().slots().html( (s,i)=›`B${i}`) 🎨 +`}$(...t){return e(this.shadowRoot).$(...t)}__increment(){const t=this.$().slots().txt();this.$("b").innerHTML+=`${t}`,this.counter=this.$("input").value=this.$("span").length}} +//# sourceMappingURL=CssChainElement.js.map diff --git a/dist/CssChainElement.js.map b/dist/CssChainElement.js.map new file mode 100644 index 0000000..3cee21c --- /dev/null +++ b/dist/CssChainElement.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/CssChainElement.js"], + "sourcesContent": ["import $ from './CssChain.js';\n\n export class\nCssChainElement extends HTMLElement\n{\n constructor()\n {\n super();\n this.title = 'Hey there';\n this.counter = 0;\n\n const t = document.createElement('div');\n t.innerHTML = this.template;\n\n this.attachShadow({mode: 'open'}).appendChild(t);\n this.$('button').addEventListener('click', ()=>this.__increment() );\n }\n\n get template()\n { return `\n •\n
\n\n`\n }\n\n $( ...arr ){ return $( this.shadowRoot ).$(...arr); }\n\n __increment()\n { const slotContent = this.$().slots().txt();\n this.$('b').innerHTML += `${ slotContent }`;\n this.counter = this.$('input').value = this.$('span').length;\n }\n}\n"], + "mappings": "AAAA,6BAEW,oCACa,YACxB,CACI,aACA,CACI,QACA,KAAK,MAAQ,YACb,KAAK,QAAU,EAEf,KAAM,GAAI,SAAS,cAAc,OACjC,EAAE,UAAY,KAAK,SAEnB,KAAK,aAAa,CAAC,KAAM,SAAS,YAAY,GAC9C,KAAK,EAAE,UAAU,iBAAiB,QAAS,IAAI,KAAK,kBAGpD,WACJ,CAAI,MAAO;AAAA;AAAA;AAAA;AAAA,EAOX,KAAM,EAAK,CAAE,MAAO,GAAG,KAAK,YAAa,EAAE,GAAG,GAE9C,aACA,CAAI,KAAM,GAAc,KAAK,IAAI,QAAQ,MACrC,KAAK,EAAE,KAAK,WAAa,SAAU,WACnC,KAAK,QAAU,KAAK,EAAE,SAAS,MAAQ,KAAK,EAAE,QAAQ", + "names": [] +} diff --git a/dist/HTMLElementMixin.d.ts b/dist/HTMLElementMixin.d.ts new file mode 100644 index 0000000..e9d66ed --- /dev/null +++ b/dist/HTMLElementMixin.d.ts @@ -0,0 +1,3665 @@ +// generated by css-chain-test/types/ast-parse.js + +import type { CssChainT} from './CssChain'; +/** Mixin of HTMLElement inherited and parents from node_modules/typescript/lib/lib.dom.d.ts + all methods return CssChainT +*/ +export interface HTMLElementMixin { + + accessKey:string; + + + accessKeyLabel:string; + + + autocapitalize:string; + + + dir:string; + + + draggable:boolean; + + + hidden:boolean; + + + innerText:string; + + + lang:string; + + + offsetHeight:number; + + + offsetLeft:number; + + + offsetParent:Element|null; + + + offsetTop:number; + + + offsetWidth:number; + + + outerText:string; + + + spellcheck:boolean; + + + title:string; + + + translate:boolean; + + + attachInternals():CssChainT; + + + click():CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions):CssChainT; + + + attributes:NamedNodeMap; + +/** Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.
*/ + + classList:DOMTokenList; + +/** Returns the value of element's class content attribute. Can be set to change it.
*/ + + className:string; + + + clientHeight:number; + + + clientLeft:number; + + + clientTop:number; + + + clientWidth:number; + +/** Returns the value of element's id content attribute. Can be set to change it.
*/ + + id:string; + +/** Returns the local name.
*/ + + localName:string; + +/** Returns the namespace.
*/ + + namespaceURI:string|null; + + + onfullscreenchange:((this: Element, ev: Event) => any)|null; + + + onfullscreenerror:((this: Element, ev: Event) => any)|null; + + + outerHTML:string; + +/** Returns the node document. Returns null for documents.
*/ + + ownerDocument:Document|null; + + + part:DOMTokenList; + +/** Returns the namespace prefix.
*/ + + prefix:string|null; + + + scrollHeight:number; + + + scrollLeft:number; + + + scrollTop:number; + + + scrollWidth:number; + +/** Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise.
*/ + + shadowRoot:ShadowRoot|null; + +/** Returns the value of element's slot content attribute. Can be set to change it.
*/ + + slot:string; + +/** Returns the HTML-uppercased qualified name.
*/ + + tagName:string; + +/** Creates a shadow root for element and returns it.
*/ + + attachShadow(init: ShadowRootInit):CssChainT; + +/** Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
*/ + + closest(selector: K):CssChainT; + +/** Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
*/ + + closest(selector: K):CssChainT; + +/** Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
*/ + + closest(selectors: string):CssChainT; + +/** Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
*/ + + getAttribute(qualifiedName: string):CssChainT; + +/** Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.
*/ + + getAttributeNS(namespace: string | null, localName: string):CssChainT; + +/** Returns the qualified names of all element's attributes. Can contain duplicates.
*/ + + getAttributeNames():CssChainT; + + + getAttributeNode(qualifiedName: string):CssChainT; + + + getAttributeNodeNS(namespace: string | null, localName: string):CssChainT; + + + getBoundingClientRect():CssChainT; + + + getClientRects():CssChainT; + +/** Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
*/ + + getElementsByClassName(classNames: string):CssChainT; + + + getElementsByTagName(qualifiedName: K):CssChainT; + + + getElementsByTagName(qualifiedName: K):CssChainT; + + + getElementsByTagName(qualifiedName: string):CssChainT; + + + getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string):CssChainT; + + + getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string):CssChainT; + + + getElementsByTagNameNS(namespace: string | null, localName: string):CssChainT; + +/** Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
*/ + + hasAttribute(qualifiedName: string):CssChainT; + +/** Returns true if element has an attribute whose namespace is namespace and local name is localName.
*/ + + hasAttributeNS(namespace: string | null, localName: string):CssChainT; + +/** Returns true if element has attributes, and false otherwise.
*/ + + hasAttributes():CssChainT; + + + hasPointerCapture(pointerId: number):CssChainT; + + + insertAdjacentElement(where: InsertPosition, element: Element):CssChainT; + + + insertAdjacentHTML(position: InsertPosition, text: string):CssChainT; + + + insertAdjacentText(where: InsertPosition, data: string):CssChainT; + +/** Returns true if matching selectors against element's root yields element, and false otherwise.
*/ + + matches(selectors: string):CssChainT; + + + releasePointerCapture(pointerId: number):CssChainT; + +/** Removes element's first attribute whose qualified name is qualifiedName.
*/ + + removeAttribute(qualifiedName: string):CssChainT; + +/** Removes element's attribute whose namespace is namespace and local name is localName.
*/ + + removeAttributeNS(namespace: string | null, localName: string):CssChainT; + + + removeAttributeNode(attr: Attr):CssChainT; + +/** Displays element fullscreen and resolves promise when done. + +When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.
*/ + + requestFullscreen(options?: FullscreenOptions):CssChainT; + + + requestPointerLock():CssChainT; + + + scroll(options?: ScrollToOptions):CssChainT; + + + scroll(x: number, y: number):CssChainT; + + + scrollBy(options?: ScrollToOptions):CssChainT; + + + scrollBy(x: number, y: number):CssChainT; + + + scrollIntoView(arg?: boolean | ScrollIntoViewOptions):CssChainT; + + + scrollTo(options?: ScrollToOptions):CssChainT; + + + scrollTo(x: number, y: number):CssChainT; + +/** Sets the value of element's first attribute whose qualified name is qualifiedName to value.
*/ + + setAttribute(qualifiedName: string, value: string):CssChainT; + +/** Sets the value of element's attribute whose namespace is namespace and local name is localName to value.
*/ + + setAttributeNS(namespace: string | null, qualifiedName: string, value: string):CssChainT; + + + setAttributeNode(attr: Attr):CssChainT; + + + setAttributeNodeNS(attr: Attr):CssChainT; + + + setPointerCapture(pointerId: number):CssChainT; + +/** If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName. + +Returns true if qualifiedName is now present, and false otherwise.
*/ + + toggleAttribute(qualifiedName: string, force?: boolean):CssChainT; + + + webkitMatchesSelector(selectors: string):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Returns node's node document's document base URL.
*/ + + baseURI:string; + +/** Returns true if node is connected and false otherwise.
*/ + + isConnected:boolean; + +/** Returns the last child.
*/ + + lastChild:ChildNode|null; + +/** Returns the next sibling.
*/ + + nextSibling:ChildNode|null; + +/** Returns a string appropriate for the type of node.
*/ + + nodeName:string; + +/** Returns the type of node.
*/ + + nodeType:number; + + + nodeValue:string|null; + +/** Returns the parent element.
*/ + + parentElement:HTMLElement|null; + +/** Returns the parent.
*/ + + parentNode:ParentNode|null; + +/** Returns the previous sibling.
*/ + + previousSibling:ChildNode|null; + + + textContent:string|null; + + + appendChild(node: T):CssChainT; + +/** Returns a copy of node. If deep is true, the copy also includes the node's descendants.
*/ + + cloneNode(deep?: boolean):CssChainT; + +/** Returns a bitmask indicating the position of other relative to node.
*/ + + compareDocumentPosition(other: Node):CssChainT; + +/** Returns true if other is an inclusive descendant of node, and false otherwise.
*/ + + contains(other: Node | null):CssChainT; + +/** Returns node's root.
*/ + + getRootNode(options?: GetRootNodeOptions):CssChainT; + +/** Returns whether node has children.
*/ + + hasChildNodes():CssChainT; + + + insertBefore(node: T, child: Node | null):CssChainT; + + + isDefaultNamespace(namespace: string | null):CssChainT; + +/** Returns whether node and otherNode have the same properties.
*/ + + isEqualNode(otherNode: Node | null):CssChainT; + + + isSameNode(otherNode: Node | null):CssChainT; + + + lookupNamespaceURI(prefix: string | null):CssChainT; + + + lookupPrefix(namespace: string | null):CssChainT; + +/** Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
*/ + + normalize():CssChainT; + + + removeChild(child: T):CssChainT; + + + replaceChild(node: Node, child: T):CssChainT; + + + ATTRIBUTE_NODE:number; + +/** node is a CDATASection node.
*/ + + CDATA_SECTION_NODE:number; + +/** node is a Comment node.
*/ + + COMMENT_NODE:number; + +/** node is a DocumentFragment node.
*/ + + DOCUMENT_FRAGMENT_NODE:number; + +/** node is a document.
*/ + + DOCUMENT_NODE:number; + +/** Set when other is a descendant of node.
*/ + + DOCUMENT_POSITION_CONTAINED_BY:number; + +/** Set when other is an ancestor of node.
*/ + + DOCUMENT_POSITION_CONTAINS:number; + +/** Set when node and other are not in the same tree.
*/ + + DOCUMENT_POSITION_DISCONNECTED:number; + +/** Set when other is following node.
*/ + + DOCUMENT_POSITION_FOLLOWING:number; + + + DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:number; + +/** Set when other is preceding node.
*/ + + DOCUMENT_POSITION_PRECEDING:number; + +/** node is a doctype.
*/ + + DOCUMENT_TYPE_NODE:number; + +/** node is an element.
*/ + + ELEMENT_NODE:number; + + + ENTITY_NODE:number; + + + ENTITY_REFERENCE_NODE:number; + + + NOTATION_NODE:number; + +/** node is a ProcessingInstruction node.
*/ + + PROCESSING_INSTRUCTION_NODE:number; + +/** node is a Text node.
*/ + + TEXT_NODE:number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean):CssChainT; + +/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
*/ + + dispatchEvent(event: Event):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean):CssChainT; + + + ariaAtomic:string; + + + ariaAutoComplete:string; + + + ariaBusy:string; + + + ariaChecked:string; + + + ariaColCount:string; + + + ariaColIndex:string; + + + ariaColSpan:string; + + + ariaCurrent:string; + + + ariaDisabled:string; + + + ariaExpanded:string; + + + ariaHasPopup:string; + + + ariaHidden:string; + + + ariaKeyShortcuts:string; + + + ariaLabel:string; + + + ariaLevel:string; + + + ariaLive:string; + + + ariaModal:string; + + + ariaMultiLine:string; + + + ariaMultiSelectable:string; + + + ariaOrientation:string; + + + ariaPlaceholder:string; + + + ariaPosInSet:string; + + + ariaPressed:string; + + + ariaReadOnly:string; + + + ariaRequired:string; + + + ariaRoleDescription:string; + + + ariaRowCount:string; + + + ariaRowIndex:string; + + + ariaRowSpan:string; + + + ariaSelected:string; + + + ariaSetSize:string; + + + ariaSort:string; + + + ariaValueMax:string; + + + ariaValueMin:string; + + + ariaValueNow:string; + + + ariaValueText:string; + + + animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions):CssChainT; + + + getAnimations(options?: GetAnimationsOptions):CssChainT; + +/** Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes. + +Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
*/ + + after(...nodes: (Node | string)[]):CssChainT; + +/** Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes. + +Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
*/ + + before(...nodes: (Node | string)[]):CssChainT; + +/** Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes. + +Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
*/ + + replaceWith(...nodes: (Node | string)[]):CssChainT; + + + innerHTML:string; + +/** Returns the first following sibling that is an element, and null otherwise.
*/ + + nextElementSibling:Element|null; + +/** Returns the first preceding sibling that is an element, and null otherwise.
*/ + + previousElementSibling:Element|null; + + + childElementCount:number; + +/** Returns the last child that is an element, and null otherwise.
*/ + + lastElementChild:Element|null; + +/** Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes. + +Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
*/ + + append(...nodes: (Node | string)[]):CssChainT; + +/** Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. + +Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
*/ + + prepend(...nodes: (Node | string)[]):CssChainT; + +/** Returns the first element that is a descendant of node that matches selectors.
*/ + + querySelector(selectors: K):CssChainT; + +/** Returns the first element that is a descendant of node that matches selectors.
*/ + + querySelector(selectors: K):CssChainT; + +/** Returns the first element that is a descendant of node that matches selectors.
*/ + + querySelector(selectors: string):CssChainT; + +/** Returns all element descendants of node that match selectors.
*/ + + querySelectorAll(selectors: K):CssChainT; + +/** Returns all element descendants of node that match selectors.
*/ + + querySelectorAll(selectors: K):CssChainT; + +/** Returns all element descendants of node that match selectors.
*/ + + querySelectorAll(selectors: string):CssChainT; + +/** Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes. + +Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
*/ + + replaceChildren(...nodes: (Node | string)[]):CssChainT; + + + assignedSlot:HTMLSlotElement|null; + + + oncopy:((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any)|null; + + + oncut:((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any)|null; + + + onpaste:((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any)|null; + + + addEventListener(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + + + removeEventListener(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + style:CSSStyleDeclaration; + + + contentEditable:string; + + + enterKeyHint:string; + + + inputMode:string; + + + isContentEditable:boolean; + +/** Fires when the user aborts the download.
*/ + + onabort:((this: GlobalEventHandlers, ev: UIEvent) => any)|null; + + + onanimationcancel:((this: GlobalEventHandlers, ev: AnimationEvent) => any)|null; + + + onanimationend:((this: GlobalEventHandlers, ev: AnimationEvent) => any)|null; + + + onanimationiteration:((this: GlobalEventHandlers, ev: AnimationEvent) => any)|null; + + + onanimationstart:((this: GlobalEventHandlers, ev: AnimationEvent) => any)|null; + + + onauxclick:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + +/** Fires when the object loses the input focus.
*/ + + onblur:((this: GlobalEventHandlers, ev: FocusEvent) => any)|null; + +/** Occurs when playback is possible, but would require further buffering.
*/ + + oncanplay:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + oncanplaythrough:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when the contents of the object or selection have changed.
*/ + + onchange:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when the user clicks the left mouse button on the object
*/ + + onclick:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + + + onclose:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when the user clicks the right mouse button in the client area, opening the context menu.
*/ + + oncontextmenu:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + + + oncuechange:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when the user double-clicks the object.
*/ + + ondblclick:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + +/** Fires on the source object continuously during a drag operation.
*/ + + ondrag:((this: GlobalEventHandlers, ev: DragEvent) => any)|null; + +/** Fires on the source object when the user releases the mouse at the close of a drag operation.
*/ + + ondragend:((this: GlobalEventHandlers, ev: DragEvent) => any)|null; + +/** Fires on the target element when the user drags the object to a valid drop target.
*/ + + ondragenter:((this: GlobalEventHandlers, ev: DragEvent) => any)|null; + +/** Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
*/ + + ondragleave:((this: GlobalEventHandlers, ev: DragEvent) => any)|null; + +/** Fires on the target element continuously while the user drags the object over a valid drop target.
*/ + + ondragover:((this: GlobalEventHandlers, ev: DragEvent) => any)|null; + +/** Fires on the source object when the user starts to drag a text selection or selected object.
*/ + + ondragstart:((this: GlobalEventHandlers, ev: DragEvent) => any)|null; + + + ondrop:((this: GlobalEventHandlers, ev: DragEvent) => any)|null; + +/** Occurs when the duration attribute is updated.
*/ + + ondurationchange:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the media element is reset to its initial state.
*/ + + onemptied:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the end of playback is reached.
*/ + + onended:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when an error occurs during object loading.
*/ + + onerror:OnErrorEventHandler; + +/** Fires when the object receives focus.
*/ + + onfocus:((this: GlobalEventHandlers, ev: FocusEvent) => any)|null; + + + onformdata:((this: GlobalEventHandlers, ev: FormDataEvent) => any)|null; + + + ongotpointercapture:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + oninput:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + oninvalid:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when the user presses a key.
*/ + + onkeydown:((this: GlobalEventHandlers, ev: KeyboardEvent) => any)|null; + +/** Fires when the user presses an alphanumeric key.
*/ + + onkeypress:((this: GlobalEventHandlers, ev: KeyboardEvent) => any)|null; + +/** Fires when the user releases a key.
*/ + + onkeyup:((this: GlobalEventHandlers, ev: KeyboardEvent) => any)|null; + +/** Fires immediately after the browser loads the object.
*/ + + onload:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when media data is loaded at the current playback position.
*/ + + onloadeddata:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the duration and dimensions of the media have been determined.
*/ + + onloadedmetadata:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when Internet Explorer begins looking for media data.
*/ + + onloadstart:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onlostpointercapture:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + +/** Fires when the user clicks the object with either mouse button.
*/ + + onmousedown:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + + + onmouseenter:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + + + onmouseleave:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + +/** Fires when the user moves the mouse over the object.
*/ + + onmousemove:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + +/** Fires when the user moves the mouse pointer outside the boundaries of the object.
*/ + + onmouseout:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + +/** Fires when the user moves the mouse pointer into the object.
*/ + + onmouseover:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + +/** Fires when the user releases a mouse button while the mouse is over the object.
*/ + + onmouseup:((this: GlobalEventHandlers, ev: MouseEvent) => any)|null; + +/** Occurs when playback is paused.
*/ + + onpause:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the play method is requested.
*/ + + onplay:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the audio or video has started playing.
*/ + + onplaying:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onpointercancel:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + onpointerdown:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + onpointerenter:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + onpointerleave:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + onpointermove:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + onpointerout:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + onpointerover:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + + + onpointerup:((this: GlobalEventHandlers, ev: PointerEvent) => any)|null; + +/** Occurs to indicate progress while downloading media data.
*/ + + onprogress:((this: GlobalEventHandlers, ev: ProgressEvent) => any)|null; + +/** Occurs when the playback rate is increased or decreased.
*/ + + onratechange:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when the user resets a form.
*/ + + onreset:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onresize:((this: GlobalEventHandlers, ev: UIEvent) => any)|null; + +/** Fires when the user repositions the scroll box in the scroll bar on the object.
*/ + + onscroll:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the seek operation ends.
*/ + + onseeked:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the current playback position is moved.
*/ + + onseeking:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Fires when the current selection changes.
*/ + + onselect:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onselectionchange:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onselectstart:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when the download has stopped.
*/ + + onstalled:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onsubmit:((this: GlobalEventHandlers, ev: SubmitEvent) => any)|null; + +/** Occurs if the load operation has been intentionally halted.
*/ + + onsuspend:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs to indicate the current playback position.
*/ + + ontimeupdate:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + ontoggle:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + ontouchcancel:((this: GlobalEventHandlers, ev: TouchEvent) => any)|null|undefined; + + + ontouchend:((this: GlobalEventHandlers, ev: TouchEvent) => any)|null|undefined; + + + ontouchmove:((this: GlobalEventHandlers, ev: TouchEvent) => any)|null|undefined; + + + ontouchstart:((this: GlobalEventHandlers, ev: TouchEvent) => any)|null|undefined; + + + ontransitioncancel:((this: GlobalEventHandlers, ev: TransitionEvent) => any)|null; + + + ontransitionend:((this: GlobalEventHandlers, ev: TransitionEvent) => any)|null; + + + ontransitionrun:((this: GlobalEventHandlers, ev: TransitionEvent) => any)|null; + + + ontransitionstart:((this: GlobalEventHandlers, ev: TransitionEvent) => any)|null; + +/** Occurs when the volume is changed, or playback is muted or unmuted.
*/ + + onvolumechange:((this: GlobalEventHandlers, ev: Event) => any)|null; + +/** Occurs when playback stops because the next frame of a video resource is not available.
*/ + + onwaiting:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onwebkitanimationend:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onwebkitanimationiteration:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onwebkitanimationstart:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onwebkittransitionend:((this: GlobalEventHandlers, ev: Event) => any)|null; + + + onwheel:((this: GlobalEventHandlers, ev: WheelEvent) => any)|null; + + + addEventListener(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + + + removeEventListener(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + autofocus:boolean; + + + dataset:DOMStringMap; + + + nonce:string; + + + tabIndex:number; + + + blur():CssChainT; + + + focus(options?: FocusOptions):CssChainT; + +/** Sets or retrieves the character set used to encode the object.
*/ + + charset:string; + +/** Sets or retrieves the coordinates of the object.
*/ + + coords:string; + + + download:string; + +/** Sets or retrieves the language code of the object.
*/ + + hreflang:string; + +/** Sets or retrieves the shape of the object.
+ + Sets or retrieves the name of the object.
+ + Sets or retrieves the frame name.
+ + Sets or retrieves the value specified in the content attribute of the meta object.
+ + Sets or retrieves the name of an input parameter for an element.
*/ + + name:string; + + + ping:string; + + + referrerPolicy:string|ReferrerPolicy; + +/** Sets or retrieves the relationship between the object and the destination of the link.
*/ + + rel:string; + + + relList:DOMTokenList; + +/** Sets or retrieves the relationship between the object and the destination of the link.
*/ + + rev:string; + +/** Sets or retrieves the shape of the object.
*/ + + shape:string; + +/** Sets or retrieves the window or frame at which to target content.
*/ + + target:string; + +/** Retrieves or sets the text of the object as a string.
+ + Sets or retrieves the text string specified by the option tag.
*/ + + text:string; + +/** Gets the classification and default behavior of the button.
+ + Returns the string "fieldset".
+ + Returns the content type of the object.
+ + Sets or retrieves the MIME type of the object.
+ + Returns the string "output".
+ + Sets or retrieves the content type of the resource designated by the value attribute.
+ + Sets or retrieves the MIME type for the associated scripting engine.
+ + Retrieves the type of select control based on the value of the MULTIPLE attribute.
+ + Gets or sets the MIME type of a media resource.
+ + Retrieves the CSS language in which the style sheet is written.
+ + Retrieves the type of control.
*/ + + type:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves a text alternative to the graphic.
*/ + + alt:string; + +/** Sets or gets whether clicks in this region cause action.
*/ + + noHref:boolean; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
*/ + + clear:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Gets or sets the baseline URL on which relative links are based.
+ + Sets or retrieves a destination URL or an anchor point.
*/ + + href:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + aLink:string; + + + background:string; + + + bgColor:string; + + + link:string; + + + onorientationchange:((this: HTMLBodyElement, ev: Event) => any)|null; + + + vLink:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + disabled:boolean; + +/** Retrieves a reference to the form that the object is embedded in.
*/ + + form:HTMLFormElement|null; + +/** Overrides the action attribute (where the data on a form is sent) on the parent form element.
*/ + + formAction:string; + +/** Used to override the encoding (formEnctype attribute) specified on the form element.
*/ + + formEnctype:string; + +/** Overrides the submit method attribute previously specified on a form element.
*/ + + formMethod:string; + +/** Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
*/ + + formNoValidate:boolean; + +/** Overrides the target attribute on a form element.
*/ + + formTarget:string; + + + labels:NodeListOf|null; + +/** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*/ + + validationMessage:string; + +/** Returns a ValidityState object that represents the validity states of an element.
*/ + + validity:ValidityState; + +/** Sets or retrieves the default or selected value of the control.
+ + Returns the value of the data at the cursor's current position.
+ + Sets or retrieves the value of a list item.
+ + Sets or retrieves the value which is returned to the server when the form control is submitted.
+ + Returns the element's current value. + +Can be set, to change the value.
+ + Sets or retrieves the value of an input parameter for an element.
+ + Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
+ + Retrieves or sets the text in the entry field of the textArea element.
*/ + + value:string|number; + +/** Returns whether an element will successfully validate based on forms validation rules and constraints.
*/ + + willValidate:boolean; + +/** Returns whether a form will validate when it is submitted, without having to submit it.
*/ + + checkValidity():CssChainT; + + + reportValidity():CssChainT; + +/** Sets a custom error message that is displayed when a form is submitted.
*/ + + setCustomValidity(error: string):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Gets or sets the height of a canvas element on a document.
+ + Sets or retrieves the height of the object.
+ + Gets or sets the height of the video element.
*/ + + height:number|string; + +/** Gets or sets the width of a canvas element on a document.
+ + Sets or retrieves the width of the object.
+ + Gets or sets the width of the video element.
+ + Sets or gets a value that you can use to implement your own width functionality for the object.
*/ + + width:number|string; + + + captureStream(frameRequestRate?: number):CssChainT; + +/** Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
*/ + + getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings):CssChainT; + +/** Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
*/ + + getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings):CssChainT; + +/** Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
*/ + + getContext(contextId: "webgl", options?: WebGLContextAttributes):CssChainT; + +/** Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
*/ + + getContext(contextId: "webgl2", options?: WebGLContextAttributes):CssChainT; + +/** Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
*/ + + getContext(contextId: string, options?: any):CssChainT; + + + toBlob(callback: BlobCallback, type?: string, quality?: any):CssChainT; + +/** Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
*/ + + toDataURL(type?: string, quality?: any):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + compact:boolean; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Returns an HTMLCollection of the option elements of the datalist element.
+ + Returns an HTMLOptionsCollection of the list of options.
*/ + + options:HTMLCollectionOf|HTMLOptionsCollection; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + open:boolean; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLDetailsElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLDetailsElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves how the object is aligned with adjacent text.
+ + Sets or retrieves a value that indicates the table alignment.
+ + Sets or retrieves the alignment of the caption or legend.
+ + Sets or retrieves the alignment of the object relative to the display or table.
*/ + + align:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves a URL to be loaded by the object.
+ + The address or URL of the a media resource that is to be considered.
+ + Retrieves the URL to an external file that contains the source code or data.
*/ + + src:string; + + + getSVGDocument():CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Returns an HTMLCollection of the form controls in the element.
+ + Retrieves a collection, in source order, of all controls in a given form.
*/ + + elements:HTMLCollection|HTMLFormControlsCollection; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + color:string; + +/** Sets or retrieves the current typeface family.
*/ + + face:string; + +/** Sets or retrieves the number of rows in the list box.
*/ + + size:string|number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
*/ + + acceptCharset:string; + +/** Sets or retrieves the URL to which the form content is sent for processing.
*/ + + action:string; + +/** Specifies whether autocomplete is applied to an editable text field.
*/ + + autocomplete:string; + +/** Sets or retrieves the MIME encoding for the form.
*/ + + encoding:string; + +/** Sets or retrieves the encoding type for the form.
*/ + + enctype:string; + +/** Sets or retrieves the number of objects in a collection.
*/ + + length:number; + +/** Sets or retrieves how to send the form data to the server.
*/ + + method:string; + +/** Designates a form that is not validated when submitted.
*/ + + noValidate:boolean; + + + requestSubmit(submitter?: HTMLElement | null):CssChainT; + +/** Fires when the user resets a form.
*/ + + reset():CssChainT; + +/** Fires when a FORM is about to be submitted.
*/ + + submit():CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Retrieves the document object of the page or frame.
*/ + + contentDocument:Document|null; + +/** Retrieves the object of the specified.
*/ + + contentWindow:WindowProxy|null; + +/** Sets or retrieves whether to display a border for the frame.
*/ + + frameBorder:string; + +/** Sets or retrieves a URI to a long description of the object.
+ + Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
*/ + + longDesc:string; + +/** Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
*/ + + marginHeight:string; + +/** Sets or retrieves the left and right margin widths before displaying the text in a frame.
*/ + + marginWidth:string; + +/** Sets or retrieves whether the user can resize the frame.
*/ + + noResize:boolean; + +/** Sets or retrieves whether the frame can be scrolled.
*/ + + scrolling:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves the frame widths of the object.
+ + Sets or retrieves the width of the object.
*/ + + cols:string|number; + +/** Sets or retrieves the frame heights of the object.
+ + Sets or retrieves the number of horizontal rows contained in the object.
*/ + + rows:string|HTMLCollectionOf|number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
*/ + + noShade:boolean; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves the DTD version that governs the current document.
*/ + + version:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + allow:string; + + + allowFullscreen:boolean; + + + sandbox:DOMTokenList; + +/** Sets or retrives the content of the page that is to contain.
*/ + + srcdoc:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Specifies the properties of a border drawn around an object.
+ + Sets or retrieves the width of the border to draw around the object.
*/ + + border:string; + +/** Retrieves whether the object is fully loaded.
*/ + + complete:boolean; + + + crossOrigin:string|null; + +/** Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
*/ + + currentSrc:string; + + + decoding:"async"|"sync"|"auto"; + +/** Sets or retrieves the width of the border to draw around the object.
*/ + + hspace:number; + +/** Sets or retrieves whether the image is a server-side image map.
*/ + + isMap:boolean; + + + loading:string; + + + lowsrc:string; + +/** The original height of the image resource before sizing.
*/ + + naturalHeight:number; + +/** The original width of the image resource before sizing.
*/ + + naturalWidth:number; + + + sizes:string|DOMTokenList; + + + srcset:string; + +/** Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
*/ + + useMap:string; + +/** Sets or retrieves the vertical margin for the object.
*/ + + vspace:number; + + + x:number; + + + y:number; + + + decode():CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves a comma-separated list of content types.
*/ + + accept:string; + + + capture:string; + +/** Sets or retrieves the state of the check box or radio button.
*/ + + checked:boolean; + +/** Sets or retrieves the state of the check box or radio button.
*/ + + defaultChecked:boolean; + +/** Sets or retrieves the initial contents of the object.
*/ + + defaultValue:string; + + + dirName:string; + +/** Returns a FileList object on a file type input object.
*/ + + files:FileList|null; + +/** When set, overrides the rendering of checkbox controls so that the current value is not visible.
*/ + + indeterminate:boolean; + +/** Specifies the ID of a pre-defined datalist of options for an input element.
*/ + + list:HTMLElement|null; + +/** Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
+ + Defines the maximum, or "done" value for a progress element.
*/ + + max:string|number; + +/** Sets or retrieves the maximum number of characters that the user can enter in a text control.
*/ + + maxLength:number; + +/** Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
*/ + + min:string|number; + + + minLength:number; + +/** Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
*/ + + multiple:boolean; + +/** Gets or sets a string containing a regular expression that the user's input must match.
*/ + + pattern:string; + +/** Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
*/ + + placeholder:string; + +/** Sets or retrieves the value indicated whether the content of the object is read-only.
*/ + + readOnly:boolean; + +/** When present, marks an element that can't be submitted without a value.
*/ + + required:boolean; + + + selectionDirection:"forward"|"backward"|"none"|null; + +/** Gets or sets the end position or offset of a text selection.
*/ + + selectionEnd:number|null; + +/** Gets or sets the starting position or offset of a text selection.
*/ + + selectionStart:number|null; + +/** Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
*/ + + step:string; + +/** Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based.
*/ + + valueAsDate:Date|null; + +/** Returns the input field value as a number.
*/ + + valueAsNumber:number; + + + webkitEntries:ReadonlyArray; + + + webkitdirectory:boolean; + +/** Makes the selection equal to the current object.
+ + Highlights the input area of a form element.
*/ + + select():CssChainT; + + + setRangeText(replacement: string):CssChainT; + + + setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode):CssChainT; + +/** Sets the start and end positions of a selection in a text field.
*/ + + setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"):CssChainT; + +/** Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
*/ + + stepDown(n?: number):CssChainT; + +/** Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
*/ + + stepUp(n?: number):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Returns the form control that is associated with this element.
*/ + + control:HTMLElement|null; + +/** Sets or retrieves the object to which the given label object is assigned.
+ + Sets or retrieves the object that is bound to the event script.
*/ + + htmlFor:string|DOMTokenList; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + as:string; + + + imageSizes:string; + + + imageSrcset:string; + + + integrity:string; + +/** Sets or retrieves the media type.
+ + Gets or sets the intended media type of the media source.
*/ + + media:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Retrieves a collection of the area objects defined for the given map object.
*/ + + areas:HTMLCollection; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + behavior:string; + + + direction:string; + +/** Gets or sets a flag to specify whether playback should restart after it completes.
*/ + + loop:number|boolean; + + + scrollAmount:number; + + + scrollDelay:number; + + + trueSpeed:boolean; + + + start():CssChainT; + + + stop():CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Gets or sets a value that indicates whether to start playing the media automatically.
*/ + + autoplay:boolean; + +/** Gets a collection of buffered time ranges.
*/ + + buffered:TimeRanges; + +/** Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
*/ + + controls:boolean; + +/** Gets or sets the current playback position, in seconds.
*/ + + currentTime:number; + + + defaultMuted:boolean; + +/** Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
*/ + + defaultPlaybackRate:number; + + + disableRemotePlayback:boolean; + +/** Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
*/ + + duration:number; + +/** Gets information about whether the playback has ended or not.
*/ + + ended:boolean; + +/** Returns an object representing the current error state of the audio or video element.
*/ + + error:MediaError|null; + +/** Available only in secure contexts.
*/ + + mediaKeys:MediaKeys|null; + +/** Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
*/ + + muted:boolean; + +/** Gets the current network activity for the element.
*/ + + networkState:number; + + + onencrypted:((this: HTMLMediaElement, ev: MediaEncryptedEvent) => any)|null; + + + onwaitingforkey:((this: HTMLMediaElement, ev: Event) => any)|null; + +/** Gets a flag that specifies whether playback is paused.
*/ + + paused:boolean; + +/** Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
*/ + + playbackRate:number; + +/** Gets TimeRanges for the current media resource that has been played.
*/ + + played:TimeRanges; + +/** Gets or sets a value indicating what data should be preloaded, if any.
*/ + + preload:"none"|"metadata"|"auto"|""; + + + readyState:number; + + + remote:RemotePlayback; + +/** Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
*/ + + seekable:TimeRanges; + +/** Gets a flag that indicates whether the client is currently moving to a new playback position in the media resource.
*/ + + seeking:boolean; + + + srcObject:MediaProvider|null; + + + textTracks:TextTrackList; + +/** Gets or sets the volume level for audio portions of the media element.
*/ + + volume:number; + + + addTextTrack(kind: TextTrackKind, label?: string, language?: string):CssChainT; + +/** Returns a string that specifies whether the client can play a given media resource type.
*/ + + canPlayType(type: string):CssChainT; + + + fastSeek(time: number):CssChainT; + +/** Resets the audio or video object and loads a new media resource.
*/ + + load():CssChainT; + +/** Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
*/ + + pause():CssChainT; + +/** Loads and starts playback of a media resource.
*/ + + play():CssChainT; + +/** Available only in secure contexts.
*/ + + setMediaKeys(mediaKeys: MediaKeys | null):CssChainT; + + + HAVE_CURRENT_DATA:number; + + + HAVE_ENOUGH_DATA:number; + + + HAVE_FUTURE_DATA:number; + + + HAVE_METADATA:number; + + + HAVE_NOTHING:number; + + + NETWORK_EMPTY:number; + + + NETWORK_IDLE:number; + + + NETWORK_LOADING:number; + + + NETWORK_NO_SOURCE:number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + disablePictureInPicture:boolean; + + + onenterpictureinpicture:((this: HTMLVideoElement, ev: Event) => any)|null; + + + onleavepictureinpicture:((this: HTMLVideoElement, ev: Event) => any)|null; + +/** Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins.
*/ + + playsInline:boolean; + +/** Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
*/ + + poster:string; + +/** Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
*/ + + videoHeight:number; + +/** Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
*/ + + videoWidth:number; + + + getVideoPlaybackQuality():CssChainT; + + + requestPictureInPicture():CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Gets or sets meta-information to associate with httpEquiv or name.
+ + Returns the template contents (a DocumentFragment).
*/ + + content:string|DocumentFragment; + +/** Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
*/ + + httpEquiv:string; + +/** Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
*/ + + scheme:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + high:number; + + + low:number; + + + optimum:number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves reference information about the object.
*/ + + cite:string; + +/** Sets or retrieves the date and time of a modification to the object.
*/ + + dateTime:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + reversed:boolean; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
*/ + + archive:string; + +/** Sets or retrieves the URL of the file containing the compiled Java class.
*/ + + code:string; + +/** Sets or retrieves the URL of the component.
*/ + + codeBase:string; + +/** Sets or retrieves the Internet media type for the code associated with the object.
*/ + + codeType:string; + +/** Sets or retrieves the URL that references the data of the object.
*/ + + data:string; + + + declare:boolean; + +/** Sets or retrieves a message to be displayed while an object is loading.
*/ + + standby:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves a value that you can use to implement your own label functionality for the object.
*/ + + label:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves the status of an option.
*/ + + defaultSelected:boolean; + +/** Sets or retrieves the ordinal position of an option in a list box.
*/ + + index:number; + +/** Sets or retrieves whether the option in the list box is the default item.
*/ + + selected:boolean; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves the data type of the value attribute.
*/ + + valueType:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
*/ + + position:number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + async:boolean; + +/** Sets or retrieves the status of the script.
*/ + + defer:boolean; + +/** Sets or retrieves the event for which the script is written.
*/ + + event:string; + + + noModule:boolean; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves the index of the selected option in a select object.
*/ + + selectedIndex:number; + + + selectedOptions:HTMLCollectionOf; + +/** Adds an element to the areas, controlRange, or options collection.
*/ + + add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null):CssChainT; + +/** Retrieves a select object or an object from an options collection.
*/ + + item(index: number):CssChainT; + +/** Retrieves a select object or an object from an options collection.
*/ + + namedItem(name: string):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + assign(...nodes: (Element | Text)[]):CssChainT; + + + assignedElements(options?: AssignedNodesOptions):CssChainT; + + + assignedNodes(options?: AssignedNodesOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLSlotElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLSlotElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves abbreviated text for the object.
*/ + + abbr:string; + +/** Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
*/ + + axis:string; + +/** Retrieves the position of the object in the cells collection of a row.
*/ + + cellIndex:number; + + + ch:string; + + + chOff:string; + +/** Sets or retrieves the number columns in the table that the object should span.
*/ + + colSpan:number; + +/** Sets or retrieves a list of header cells that provide information for the object.
*/ + + headers:string; + +/** Sets or retrieves whether the browser automatically performs wordwrap.
*/ + + noWrap:boolean; + +/** Sets or retrieves how many rows in a table the cell should span.
*/ + + rowSpan:number; + +/** Sets or retrieves the group of cells in a table to which the object's information applies.
*/ + + scope:string; + + + vAlign:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Sets or retrieves the number of columns in the group.
*/ + + span:number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Retrieves the caption object of a table.
*/ + + caption:HTMLTableCaptionElement|null; + +/** Sets or retrieves the amount of space between the border of the cell and the content of the cell.
*/ + + cellPadding:string; + +/** Sets or retrieves the amount of space between cells in a table.
*/ + + cellSpacing:string; + +/** Sets or retrieves the way the border frame around the table is displayed.
*/ + + frame:string; + +/** Sets or retrieves which dividing lines (inner borders) are displayed.
*/ + + rules:string; + +/** Sets or retrieves a description and/or structure of the object.
*/ + + summary:string; + +/** Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
*/ + + tBodies:HTMLCollectionOf; + +/** Retrieves the tFoot object of the table.
*/ + + tFoot:HTMLTableSectionElement|null; + +/** Retrieves the tHead object of the table.
*/ + + tHead:HTMLTableSectionElement|null; + +/** Creates an empty caption element in the table.
*/ + + createCaption():CssChainT; + +/** Creates an empty tBody element in the table.
*/ + + createTBody():CssChainT; + +/** Creates an empty tFoot element in the table.
*/ + + createTFoot():CssChainT; + +/** Returns the tHead element object if successful, or null otherwise.
*/ + + createTHead():CssChainT; + +/** Deletes the caption element and its contents from the table.
*/ + + deleteCaption():CssChainT; + +/** Removes the specified row (tr) from the element and from the rows collection.
*/ + + deleteRow(index: number):CssChainT; + +/** Deletes the tFoot element and its contents from the table.
*/ + + deleteTFoot():CssChainT; + +/** Deletes the tHead element and its contents from the table.
*/ + + deleteTHead():CssChainT; + +/** Creates a new row (tr) in the table, and adds the row to the rows collection.
*/ + + insertRow(index?: number):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Retrieves a collection of all cells in the table row.
*/ + + cells:HTMLCollectionOf; + +/** Retrieves the position of the object in the rows collection for the table.
*/ + + rowIndex:number; + +/** Retrieves the position of the object in the collection.
*/ + + sectionRowIndex:number; + +/** Removes the specified cell from the table row, as well as from the cells collection.
*/ + + deleteCell(index: number):CssChainT; + +/** Creates a new cell in the table row, and adds the cell to the cells collection.
*/ + + insertCell(index?: number):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + textLength:number; + +/** Sets or retrieves how to handle wordwrapping in the object.
*/ + + wrap:string; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + + + default:boolean; + + + kind:string; + + + srclang:string; + +/** Returns the TextTrack object corresponding to the text track of the track element.
*/ + + track:TextTrack; + + + ERROR:number; + + + LOADED:number; + + + LOADING:number; + + + NONE:number; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +/** Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
*/ + + addEventListener(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions):CssChainT; + +/** Removes the event listener in target's event listener list with the same type, callback, and options.
*/ + + removeEventListener(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions):CssChainT; + +} diff --git a/dist/PokeApi-Explorer.html b/dist/PokeApi-Explorer.html new file mode 100644 index 0000000..0ff9111 --- /dev/null +++ b/dist/PokeApi-Explorer.html @@ -0,0 +1,95 @@ + + + + PokéAPI Explorer - CssChain use sample + + + + + + +

PokéAPI Explorer - CssChain use sample

+ +
+ Demo home | + The RESTful Pokémon API | + Sprites | + + Source + git + +
+ JSON data from API filled into web component sample.
+ Template uses slots as placeholder for JSON data.
+
+
+ +
+ + loading... pokemons + + + + + +
...
+ +
+
+ loading +
+ + + + + + diff --git a/dist/PokeApi-Explorer.js b/dist/PokeApi-Explorer.js new file mode 100644 index 0000000..368f7cc --- /dev/null +++ b/dist/PokeApi-Explorer.js @@ -0,0 +1,19 @@ +var w=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var x=(s,e)=>{var l={};for(var n in s)A.call(s,n)&&e.indexOf(n)<0&&(l[n]=s[n]);if(s!=null&&w)for(var n of w(s))e.indexOf(n)<0&&P.call(s,n)&&(l[n]=s[n]);return l};import B from"https://unpkg.com/slotted-element@1.0.3/fetch-element.js";import{CssChain as u}from"./CssChain.js";const f=(s,e,l="")=>s.map(e).join(l),k=s=>s&&s.endsWith&&["png","gif","svg"].find(e=>s.endsWith(e));window.customElements.define("pokemon-link-element",class extends HTMLElement{connectedCallback(){const e=u(this),l=t=>e.$(t),n=e.attr("name"),p=e.attr("url");if(k(p)){debugger;return e.html(``)}e.html(`${n}
`),l("a").on("click",async t=>{if(t.preventDefault(),this.loaded)return l("dl").erase(),this.loaded=0;this.loaded=1;const r=await(await fetch(p)).json();l("dl").html(m(r))});function m(t,r=""){if(t==null||typeof t=="string"||typeof t=="number")return k(t)?``:r?`${r} : ${t}`:`${t}`;if(Array.isArray(t))return`
${r}${f(t,m,"
")}
`;let o=[],i=Object.keys(t);const $=t.name&&t.url&&k(t.url)?``:` `;if(i.length===2&&t.name&&t.url)o.push($);else{r&&(o.push("
"),o.push(`${r}`));for(let a in t)switch(a){case"name":if(t.url)break;case"url":t.url&&t.name&&o.push($);break;default:Array.isArray(t[a])?o.push(`
${a}${f(t[a],d=>m(d),"
")}
`):o.push(m(t[a],a))}r&&o.push("
")}return o.join("")}}}),window.customElements.define("pokemon-info-element",class extends B{render(e){const o=e.sprites,{other:l,versions:n}=o,p=x(o,["other","versions"]),m=(i,$)=>`
${i} + ${f(Object.entries($),([a,d])=>d?typeof d=="string"?``:m(a,d):"")}
`,t=()=>`
abilities + ${f(e.abilities,i=>`${i.ability.name}${i.slot}`)}
`,r=(i,$)=>`
${i}${f($,a=>``)}
`;return`

${e.name}

+ +
+ ${r("abilities",e.abilities.map(i=>i.ability))} + ${r("forms",e.forms)} + ${r("game indices",e.game_indices.map(i=>i.version))} + ${r("moves",e.moves.map(i=>i.move))} + ${r("stats",e.stats.map(i=>i.stat))} + ${r("types",e.types.map(i=>i.type))} + ${r("species",[e.species])} +
+ ${m("Sprites",p)} + ${m("other",l)} + ${m("versions",n)} + `}});let c=0,h=10;const C=async()=>(await fetch(`https://pokeapi.co/api/v2/pokemon?limit=${h}&offset=${c}`)).json(),E=u(),y=async s=>u("pokemon-info-element").attr("src",s.url),I=s=>(e=>(e.pop(),e.pop()))(s.url.split("/")),j=s=>`https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world/${I(s)}.svg`,g=E.slots("slot-select"),b=g.parent().$("dl"),v=async()=>{const s=await C();return b.erase(),c?b.append(g.clone(s.results,(e,l,n)=>u(e).prop("hidden",!1).prop("checked",!n,"input").prop("src",j(l),"img").on("click",()=>y(l)).slots("index",""+(c+n)).slots("name",l.name))):s.results.forEach((e,l)=>{const n=g.clone();n.hidden=!1,n.$("input").checked=!l,n.slots("index").innerText=""+(c+l),n.slots("name").innerText=e.name,n.on("click",()=>y(e)),n.$("img").src=j(e),b.append(n)}),y(s.results[0]),prevBtn.disabled=c<=0,nextBtn.disabled=c+h>=s.count,s};g.remove();const L=await v();E.slots("counter").txt(L.count),prevBtn.onclick=()=>v(c-=h),nextBtn.onclick=()=>v(c+=h); +//# sourceMappingURL=PokeApi-Explorer.js.map diff --git a/dist/PokeApi-Explorer.js.map b/dist/PokeApi-Explorer.js.map new file mode 100644 index 0000000..c11e301 --- /dev/null +++ b/dist/PokeApi-Explorer.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/PokeApi-Explorer.js"], + "sourcesContent": ["import FetchElement from 'https://unpkg.com/slotted-element@1.0.3/fetch-element.js';\n// import { CssChain as $$ } from \"https://unpkg.com/css-chain@1/CssChain.js\";\nimport { CssChain as $$ } from \"./CssChain.js\";\n\nconst arr2str = (arr,cb, separator='') => arr.map(cb).join(separator)\n, isImg = url => url && url.endsWith && ['png','gif','svg'].find( x=>url.endsWith(x) );\n\nwindow.customElements.define('pokemon-link-element',\n class PokemonInfoElement extends HTMLElement\n {\n connectedCallback()\n {\n const $this = $$(this)\n , $ = x => $this.$(x)\n , name = $this.attr('name')\n , url = $this.attr('url');\n if( isImg(url) )\n {\n debugger;\n return $this.html( `` );\n }\n\n\n $this.html(`${name}
`);\n\n $('a').on('click', async e=>\n { e.preventDefault();\n if(this.loaded)\n return $('dl').erase(), this.loaded=0;\n this.loaded =1;\n const d = await ( await fetch(url) ).json();\n $('dl').html( render(d) );\n });\n\n function render( d, n='' )\n {\n if( d === undefined || d === null || 'string' === typeof d || 'number' === typeof d )\n { if( isImg(d) )\n return ``;\n return n ? `${ n } : ${ d }` : `${ d }`;\n }\n if( Array.isArray( d ))\n return `
${n}${ arr2str( d, render,'
' ) }
`;\n\n let ret = [], keys = Object.keys(d);\n const link = ( d.name && d.url ) && isImg(d.url)\n ? ``\n : ` `;\n\n if( keys.length ===2 && d.name && d.url )\n ret.push( link )\n else\n { if( n )\n { ret.push( '
' );\n ret.push( `${ n }` )\n }\n for( let k in d )\n switch( k )\n { case 'name':\n if( d.url )\n break;\n case 'url':\n d.url && d.name && ret.push( link ); break;\n default:\n if( Array.isArray( d[ k ] ) )\n ret.push( `
${ k }${\n arr2str( d[ k ], v=>render(v),'
' )\n }
` );\n else\n ret.push( render( d[ k ], k ) );\n }\n n && ret.push( '
' );\n }\n return ret.join('')\n }\n }\n\n });\n\n\nwindow.customElements.define('pokemon-info-element',\n class PokemonInfoElement extends FetchElement\n {\n render(pokemon)\n {\n const { other, versions, ...sprites } = pokemon.sprites;\n const renderCollection = (title, obj) => `
${title}\n ${ arr2str( Object.entries(obj), ([k,v]) => !v ? ''\n : ('string' === typeof v\n ? ``\n : renderCollection(k,v) ) )\n }
`;\n const renderAbilities = () => `
abilities\n ${ arr2str( pokemon.abilities, a => `${a.ability.name}${a.slot}` )\n }
`;\n const nameUrlArr = (name,arr)=>`
${name}${\n arr2str(arr, a => `` )\n }
`;\n\n\n return `

${ pokemon.name }

\n \"\"\n
\n ${nameUrlArr('abilities',pokemon.abilities.map(a=>a.ability))}\n ${nameUrlArr('forms',pokemon.forms)}\n ${nameUrlArr('game indices',pokemon.game_indices.map(i=>i.version))}\n ${nameUrlArr('moves',pokemon.moves.map(i=>i.move))}\n ${nameUrlArr('stats',pokemon.stats.map(i=>i.stat))}\n ${nameUrlArr('types',pokemon.types.map(i=>i.type))}\n ${nameUrlArr('species',[pokemon.species])}\n
\n ${ renderCollection('Sprites' ,sprites ) }\n ${ renderCollection('other' ,other ) }\n ${ renderCollection('versions' ,versions ) }\n `;\n }\n });\n\nlet offset = 0\n, limit = 10;\nconst getPokeList = async () =>\n ( await\n // fetch( '../test/pokeapi-page0.json')\n fetch( `https://pokeapi.co/api/v2/pokemon?limit=${limit}&offset=${offset}`)\n ).json()\n, $ = $$()\n, onSelected = async (p) => $$('pokemon-info-element').attr( 'src', p.url )\n, getPokemonId = p=> ( arr=>(arr.pop(), arr.pop()) )( p.url.split('/') )\n, getImgByPokemon = p =>`https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world/${getPokemonId(p)}.svg`\n, $template = $.slots('slot-select')\n, $listContainer = $template.parent().$('dl')\n, renderList = async()=>\n {\n const page = await getPokeList();\n\n $listContainer.erase();\n // yield version\n\n if( offset ) // call chain with callbacks version\n $listContainer.append(\n $template.clone( page.results, (cloned, p,i)=>\n $$(cloned)\n .prop('hidden', false )\n .prop('checked', !i, 'input')\n .prop('src', getImgByPokemon( p ), 'img')\n .on('click', ()=>onSelected(p) )\n .slots( 'index', ''+(offset + i) )\n .slots( 'name', p.name ) ) );\n else // same without call chain, just as show case of HTMLElement API in CssChain\n page.results.forEach( (p,i)=>\n {\n const $c = $template.clone();\n $c.hidden = false;\n $c.$('input').checked = !i;\n $c.slots( 'index' ).innerText = ''+(offset + i);\n $c.slots( 'name' ).innerText = p.name;\n $c.on('click', ()=>onSelected(p) )\n $c.$('img').src = getImgByPokemon( p );\n $listContainer.append($c);\n });\n\n onSelected( page.results[0] );\n\n prevBtn.disabled = offset <= 0;\n nextBtn.disabled = offset+limit >= page.count;\n return page;\n };\n$template.remove();\nconst firstPage = await renderList()\n$.slots('counter').txt( firstPage.count );\nprevBtn.onclick = ()=> renderList( offset-=limit );\nnextBtn.onclick = ()=> renderList( offset+=limit );\n"], + "mappings": "mRAAA,wEAEA,yCAEA,KAAM,GAAU,CAAC,EAAI,EAAI,EAAU,KAAO,EAAI,IAAI,GAAI,KAAK,GACvD,EAAQ,GAAO,GAAO,EAAI,UAAY,CAAC,MAAM,MAAM,OAAO,KAAM,GAAG,EAAI,SAAS,IAEpF,OAAO,eAAe,OAAO,uBACzB,aAAiC,YACjC,CACI,mBACA,CACI,KAAM,GAAQ,EAAG,MACb,EAAI,GAAK,EAAM,EAAE,GACf,EAAO,EAAM,KAAK,QACjB,EAAM,EAAM,KAAK,OACxB,GAAI,EAAM,GACV,CACI,SACA,MAAO,GAAM,KAAM,eAAgB,WAAgB,OAIvD,EAAM,KAAK,YAAY,MAAQ,kBAE/B,EAAE,KAAK,GAAG,QAAS,KAAM,IACzB,CACI,GADA,EAAE,iBACC,KAAK,OACJ,MAAO,GAAE,MAAM,QAAS,KAAK,OAAO,EACxC,KAAK,OAAQ,EACb,KAAM,GAAI,KAAQ,MAAM,OAAM,IAAO,OACrC,EAAE,MAAM,KAAM,EAAO,MAGzB,WAAiB,EAAG,EAAE,GACtB,CACI,GAAI,AAAmB,GAAM,MAAQ,AAAa,MAAO,IAApB,UAAyB,AAAa,MAAO,IAApB,SAC1D,MAAI,GAAM,GACC,eAAe;AAAA,EAAM,WAAW,MACpC,EAAI,eAAgB,mBAAqB,iBAAoB,QAAS,UAEjF,GAAI,MAAM,QAAS,GACf,MAAO,qBAAqB,aAAe,EAAS,EAAG,EAAO,sBAElE,GAAI,GAAM,GAAI,EAAO,OAAO,KAAK,GACjC,KAAM,GAAS,EAAE,MAAQ,EAAE,KAAS,EAAM,EAAE,KACnC,eAAe,WAAc,OAC7B,+BAA+B,EAAE,cAAc,EAAE,gCAE1D,GAAI,EAAK,SAAU,GAAK,EAAE,MAAQ,EAAE,IAChC,EAAI,KAAM,OAEd,CAAI,AAAI,GACA,GAAI,KAAM,cACV,EAAI,KAAM,WAAY,eAE1B,OAAS,KAAK,GACV,OAAQ,OACC,OACD,GAAI,EAAE,IACF,UACH,MACD,EAAE,KAAO,EAAE,MAAQ,EAAI,KAAM,GAAQ,cAErC,AAAI,MAAM,QAAS,EAAG,IAClB,EAAI,KAAM,qBAAsB,aAC5B,EAAS,EAAG,GAAK,GAAG,EAAO,GAAG,uBAGlC,EAAI,KAAM,EAAQ,EAAG,GAAK,IAE1C,GAAK,EAAI,KAAM,eAEnB,MAAO,GAAI,KAAK,QAOhC,OAAO,eAAe,OAAO,uBACzB,aAAiC,EACjC,CACI,OAAO,EACP,CACI,KAAwC,KAAQ,QAAxC,SAAO,YAAyB,EAAZ,IAAY,EAAZ,CAApB,QAAO,aACT,EAAmB,CAAC,EAAO,IAAS,qBAAqB;AAAA,kBACvD,EAAS,OAAO,QAAQ,GAAM,CAAC,CAAC,EAAE,KAAO,AAAC,EAChC,AAAa,MAAO,IAApB,SACE,aAAa,aAAa,OAC1B,EAAiB,EAAE,GAHe,iBAKhD,EAAkB,IAAO;AAAA,kBACvB,EAAS,EAAQ,UAAW,GAAK,YAAY,EAAE,QAAQ,QAAQ,EAAE,QAAQ,gBAAgB,EAAE,2BAE7F,EAAa,CAAC,EAAK,IAAM,qBAAqB,cACxC,EAAQ,EAAK,GAAK,8BAA8B,EAAE,cAAc,EAAE,6CAI9E,MAAO,OAAQ,EAAQ;AAAA,gCACF,6EAA6E,EAAQ;AAAA;AAAA,0BAE5F,EAAW,YAAY,EAAQ,UAAU,IAAI,GAAG,EAAE;AAAA,0BAClD,EAAW,QAAQ,EAAQ;AAAA,0BAC3B,EAAW,eAAe,EAAQ,aAAa,IAAI,GAAG,EAAE;AAAA,0BACxD,EAAW,QAAQ,EAAQ,MAAM,IAAI,GAAG,EAAE;AAAA,0BAC1C,EAAW,QAAQ,EAAQ,MAAM,IAAI,GAAG,EAAE;AAAA,0BAC1C,EAAW,QAAQ,EAAQ,MAAM,IAAI,GAAG,EAAE;AAAA,0BAC1C,EAAW,UAAU,CAAC,EAAQ;AAAA;AAAA,sBAEjC,EAAiB,UAAa;AAAA,sBAC9B,EAAiB,QAAa;AAAA,sBAC9B,EAAiB,WAAa;AAAA,yBAKrD,GAAI,GAAS,EACT,EAAQ,GACZ,KAAM,GAAc,SACb,MAEC,OAAO,2CAA2C,YAAgB,MACpE,OACF,EAAI,IACJ,EAAa,KAAO,IAAM,EAAG,wBAAwB,KAAM,MAAO,EAAE,KACpE,EAAe,GAAM,IAAM,GAAI,MAAO,EAAI,QAAU,EAAE,IAAI,MAAM,MAChE,EAAkB,GAAI,6EAA6E,EAAa,SAChH,EAAY,EAAE,MAAM,eACpB,EAAiB,EAAU,SAAS,EAAE,MACtC,EAAa,SACb,CACI,KAAM,GAAO,KAAM,KAEnB,SAAe,QAGf,AAAI,EACA,EAAe,OACX,EAAU,MAAO,EAAK,QAAS,CAAC,EAAQ,EAAE,IAC1C,EAAG,GACE,KAAK,SAAU,IACf,KAAK,UAAW,CAAC,EAAG,SACpB,KAAK,MAAO,EAAiB,GAAK,OAClC,GAAG,QAAS,IAAI,EAAW,IAC3B,MAAO,QAAS,GAAI,GAAS,IAC7B,MAAO,OAAQ,EAAE,QAE1B,EAAK,QAAQ,QAAS,CAAC,EAAE,IACzB,CACI,KAAM,GAAK,EAAU,QACrB,EAAG,OAAS,GACZ,EAAG,EAAE,SAAS,QAAU,CAAC,EACzB,EAAG,MAAO,SAAU,UAAY,GAAI,GAAS,GAC7C,EAAG,MAAO,QAAS,UAAY,EAAE,KACjC,EAAG,GAAG,QAAS,IAAI,EAAW,IAC9B,EAAG,EAAE,OAAO,IAAM,EAAiB,GACnC,EAAe,OAAO,KAG9B,EAAY,EAAK,QAAQ,IAEzB,QAAQ,SAAW,GAAU,EAC7B,QAAQ,SAAW,EAAO,GAAS,EAAK,MACjC,GAEf,EAAU,SACV,KAAM,GAAY,KAAM,KACxB,EAAE,MAAM,WAAW,IAAK,EAAU,OAClC,QAAQ,QAAU,IAAK,EAAY,GAAQ,GAC3C,QAAQ,QAAU,IAAK,EAAY,GAAQ", + "names": [] +} diff --git a/dist/css-chain-element.js b/dist/css-chain-element.js new file mode 100644 index 0000000..b94c215 --- /dev/null +++ b/dist/css-chain-element.js @@ -0,0 +1,2 @@ +import{CssChainElement as e}from"./CssChainElement.js";window.customElements.define("css-chain",e);export default e; +//# sourceMappingURL=css-chain-element.js.map diff --git a/dist/css-chain-element.js.map b/dist/css-chain-element.js.map new file mode 100644 index 0000000..77dfde9 --- /dev/null +++ b/dist/css-chain-element.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/css-chain-element.js"], + "sourcesContent": ["import { CssChainElement } from './CssChainElement.js';\n\nwindow.customElements.define( 'css-chain', CssChainElement);\n\nexport default CssChainElement;\n"], + "mappings": "AAAA,uDAEA,OAAO,eAAe,OAAQ,YAAa,GAE3C,cAAe", + "names": [] +} diff --git a/dist/demo.html b/dist/demo.html new file mode 100644 index 0000000..4cec2b0 --- /dev/null +++ b/dist/demo.html @@ -0,0 +1,55 @@ + + + + css-chain demo + + + + + +

Working demo of CssChain

+
+ git + GitHub + +| test coverage +| Working with slots +| PokéAPI Explorer +| light DOM templates & slots +
+ +

In order to use SccChain within web component, declare the $ method in class:

+ + + + + +

Then this.$(css) is available for accessing the DOM like in sample.

+ + + + + 🍦 + 🌼 + +
+ + + diff --git a/dist/slots-in-shadow.js b/dist/slots-in-shadow.js new file mode 100644 index 0000000..58419d6 --- /dev/null +++ b/dist/slots-in-shadow.js @@ -0,0 +1,29 @@ +import{CssChain as e}from"./CssChain.js";const s=` + out of slot + + + default slot +
inner 1
+
+ inner 2 +
inner 1 in 2
+
inner 2 in 2
+
+
+
+

+ prefix + + outer slot + \n \n suffix\n

\n`;\nclass SlotsInShadowDemo extends HTMLElement\n{\n constructor()\n { super();\n let template = document.createElement('template');\n template.innerHTML = templateStr;\n this.attachShadow({mode: 'open'}).appendChild(template.content);\n this.$ = css => css ? $$(css,this.shadowRoot) : $$(this.shadowRoot);\n }\n}\nwindow.customElements.define( 'slots-in-shadow', SlotsInShadowDemo);\n"], + "mappings": "AAAA,yCAEA,KAAM,GAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4BlB,eAAgC,YAChC,CACI,aACA,CAAI,QACA,GAAI,GAAW,SAAS,cAAc,YACtC,EAAS,UAAY,EACrB,KAAK,aAAa,CAAC,KAAM,SAAS,YAAY,EAAS,SACvD,KAAK,EAAI,GAAO,EAAO,EAAG,EAAI,KAAK,YAAc,EAAG,KAAK,aAGjE,OAAO,eAAe,OAAQ,kBAAmB", + "names": [] +} diff --git a/dist/slots-light-vs-shadow.html b/dist/slots-light-vs-shadow.html new file mode 100644 index 0000000..48294de --- /dev/null +++ b/dist/slots-light-vs-shadow.html @@ -0,0 +1,966 @@ + + + + Slots in HTML template - Unit test samples in visual presentation + + + + + + +
+
+

Visual presentation of Slot in shadow DOM from + Chromium unit test

+ Demo home + | List from data +
+
+ Outline: + shadow DOM blue , + light DOM green. They should be rendered identical. + +
+ + + +

Slots: Basic. Basic, elements only. +

+ +
+ + +

Slots in closed; Slots in closed, elements only +

+ +
+ + +

Slots not in a shadow tree, ... elements only +

+ +
+ + +

assignedSlot, assignedNodes(), assignedNodes({ flatten: true }) +

+ +
+ + +

assignedSlot +

+ +
+ + +

assignedSlot +

+ +
+ + +

assignedSlot +

+ +
+ + +

assignedSlot +

+ +
+ + +

assignedSlot +

+ +
+ + +

assignedSlot, assignedNodes({ flatten: true }) +

+ +
+ + +

assignedSlot, assignedNodes({ flatten: true }) +

+ +
+ + +

assignedSlot, assignedNodes({ flatten: true }) +

+ +
+ + +

assignedSlot, assignedNodes((),assignedNodes({ flatten: true }) +

+ +
+ + + + + + + + diff --git a/dist/slots-light-vs-shadow.js b/dist/slots-light-vs-shadow.js new file mode 100644 index 0000000..d7c6b40 --- /dev/null +++ b/dist/slots-light-vs-shadow.js @@ -0,0 +1,2 @@ +import{CssChain as l}from"./CssChain.js";export function createTestTree(o){let i={light:{}};function a(e){let t=e.parentNode;t.removeChild(e);let d;e.getAttribute("data-slot-assignment")==="manual"?d=t.attachShadow({mode:e.getAttribute("data-mode"),slotAssignment:"manual"}):d=t.attachShadow({mode:e.getAttribute("data-mode")});let r=e.id;return r&&(d.id=r,i[r]=d),d.appendChild(document.importNode(e.content,!0)),d}function n(e){e.id&&(i[e.id]=e);for(let t of Array.from(e.querySelectorAll("[id]")))i[t.id]=t;for(let t of Array.from(e.querySelectorAll("template")))n(a(t))}function h(e){e.id&&(i.light[e.id]=e),l("[id]",e).map(t=>i.light[t.id]=t),l("template",e).map(t=>{const d=t.parentNode;d.removeChild(t),l(d).template(t),h(d)})}const s=(e,t)=>{let d=o.cloneNode(!0);return d.id="",d.classList.add(t),t==="light"?i.light[o.id]=d:i[o.id]=d,e.parentNode.appendChild(d),d};return n(s(o,"shadow")),h(s(o,"light")),i}export function removeWhiteSpaceOnlyTextNodes(o){for(var i=0;i ids.light[ e.id ] = e );\n\n $( 'template', root )\n .map( t =>\n { const p = t.parentNode;\n p.removeChild(t);\n $(p).template(t);\n walkLightDom( p );\n });\n }\n\n const cloneAppend = (n,classname) =>\n { let x = node.cloneNode( true );\n x.id='';\n x.classList.add(classname);\n if( classname==='light')\n ids.light[node.id]=x;\n else\n ids[node.id]=x;\n n.parentNode.appendChild(x);\n return x\n };\n\n walkShadowDom( cloneAppend( node,'shadow' ) );\n walkLightDom( cloneAppend( node ,'light' ) );\n\n return ids;\n}\n\n// https://github.com/chromium/chromium/blob/main/third_party/blink/web_tests/external/wpt/shadow-dom/resources/shadow-dom.js#L1\nexport function removeWhiteSpaceOnlyTextNodes(node)\n{\n for (var i = 0; i < node.childNodes.length; i++) {\n var child = node.childNodes[i];\n if (child.nodeType === Node.TEXT_NODE && child.nodeValue.trim().length == 0) {\n node.removeChild(child);\n i--;\n } else if (child.nodeType === Node.ELEMENT_NODE || child.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n removeWhiteSpaceOnlyTextNodes(child);\n }\n }\n if (node.shadowRoot) {\n removeWhiteSpaceOnlyTextNodes(node.shadowRoot);\n }\n}\n"], + "mappings": "AAIA,yCAOO,+BAAyB,EAChC,CAEI,GAAI,GAAM,CAAC,MAAM,IAEjB,WAAmC,EACnC,CACI,GAAI,GAAS,EAAS,WACtB,EAAO,YAAa,GACpB,GAAI,GACJ,AAAI,EAAS,aAAc,0BAA6B,SAEpD,EACI,EAAO,aAAc,CACjB,KAAM,EAAS,aAAc,aAC7B,eAAgB,WAIxB,EAAa,EAAO,aAChB,CAAE,KAAM,EAAS,aAAc,eAEvC,GAAI,GAAK,EAAS,GAElB,MAAI,IAEA,GAAW,GAAK,EAChB,EAAK,GAAO,GAEhB,EAAW,YAAa,SAAS,WAAY,EAAS,QAAS,KACxD,EAGX,WAAwB,EACxB,CACI,AAAI,EAAK,IAEL,GAAK,EAAK,IAAO,GAErB,OAAS,KAAK,OAAM,KAAM,EAAK,iBAAkB,SAE7C,EAAK,EAAE,IAAO,EAElB,OAAS,KAAK,OAAM,KAAM,EAAK,iBAAkB,aAE7C,EAAe,EAA0B,IAIjD,WAAuB,EACvB,CAAI,AAAI,EAAK,IACL,GAAI,MAAO,EAAK,IAAO,GAE3B,EAAG,OAAO,GAAO,IAAK,GAAK,EAAI,MAAO,EAAE,IAAO,GAE/C,EAAG,WAAY,GACV,IAAK,GACN,CAAI,KAAM,GAAI,EAAE,WACZ,EAAE,YAAY,GACd,EAAE,GAAG,SAAS,GACd,EAAc,KAI1B,KAAM,GAAc,CAAC,EAAE,IACvB,CAAI,GAAI,GAAI,EAAK,UAAW,IACxB,SAAE,GAAG,GACL,EAAE,UAAU,IAAI,GAChB,AAAI,IAAY,QACZ,EAAI,MAAM,EAAK,IAAI,EAEnB,EAAI,EAAK,IAAI,EACjB,EAAE,WAAW,YAAY,GAClB,GAGX,SAAe,EAAa,EAAK,WACjC,EAAc,EAAa,EAAM,UAE1B,EAIJ,8CAAuC,EAC9C,CACI,OAAS,GAAI,EAAG,EAAI,EAAK,WAAW,OAAQ,IAAK,CAC7C,GAAI,GAAQ,EAAK,WAAW,GAC5B,AAAI,EAAM,WAAa,KAAK,WAAa,EAAM,UAAU,OAAO,QAAU,EACtE,GAAK,YAAY,GACjB,KACO,GAAM,WAAa,KAAK,cAAgB,EAAM,WAAa,KAAK,yBACvE,8BAA8B,GAGtC,AAAI,EAAK,YACL,8BAA8B,EAAK", + "names": [] +} diff --git a/dist/slots.html b/dist/slots.html new file mode 100644 index 0000000..31161f4 --- /dev/null +++ b/dist/slots.html @@ -0,0 +1,130 @@ + + + + Slots in HTML template - Unit test samples in visual presentation + + + + + + +
+
+

Visual presentation of Slot in shadow DOM from unit test

+ Demo home + | List from data +
+ + Only first level slots in template are substituted from web component content HTML.
+ The embedded slots like "inner-X" in sample template are ignored by shadowDOM. + +
+ + + + + + + +

fallback

+
+
+ + + +

inner without slot

+
+ without name +
+
+
+ + +
+ outer replacement +
+
+
+ + +
replaced with colored code
+ +
+ +
replaced with colored code
+ +
+ +
replaced with colored code
+ +
+ +
replaced with colored code
+ +
+ + + diff --git a/package.json b/package.json index 658385e..5456c92 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"" }, "dependencies": { - "css-chain": "^1.0.13", + "css-chain": "^1.1.0", "lit": "^2.2.0" }, "devDependencies": { diff --git a/src/PokeApi-Explorer.js b/src/PokeApi-Explorer.js index c8a91d1..8185393 100644 --- a/src/PokeApi-Explorer.js +++ b/src/PokeApi-Explorer.js @@ -139,20 +139,20 @@ const getPokeList = async () => if( offset ) // call chain with callbacks version $listContainer.append( $template.clone( page.results, (cloned, p,i)=> - $$(cloned) - .prop('hidden', false ) - .prop('checked', !i, 'input') - .prop('src', getImgByPokemon( p ), 'img') - .on('click', ()=>onSelected(p) ) - .slots( 'index', offset + i ) - .slots( 'name', p.name ) ) ); + $$(cloned) + .prop('hidden', false ) + .prop('checked', !i, 'input') + .prop('src', getImgByPokemon( p ), 'img') + .on('click', ()=>onSelected(p) ) + .slots( 'index', ''+(offset + i) ) + .slots( 'name', p.name ) ) ); else // same without call chain, just as show case of HTMLElement API in CssChain page.results.forEach( (p,i)=> { const $c = $template.clone(); $c.hidden = false; $c.$('input').checked = !i; - $c.slots( 'index' ).innerText = offset + i; + $c.slots( 'index' ).innerText = ''+(offset + i); $c.slots( 'name' ).innerText = p.name; $c.on('click', ()=>onSelected(p) ) $c.$('img').src = getImgByPokemon( p );