@@ -12,18 +12,18 @@ const nop = ()=>''
12
12
, isFn = a => isT ( a , 'function' )
13
13
, isNode = n => n && n . nodeType
14
14
, inWC = n => n . getRootNode ( ) . host
15
- , hasAssigned = n => inWC ( n ) && n . assignedElements
15
+ , hasAssigned = n => inWC ( n ) && n . assignedNodes
16
16
, each = ( arr , cb ) => ( arr . forEach ( cb ) , arr )
17
17
, clear = n => hasAssigned ( n )
18
- ? n . assignedElements ( ) . forEach ( a => a . remove ( ) )
18
+ ? n . assignedNodes ( ) . forEach ( a => a . remove ( ) )
19
19
: n . innerHTML = '' ;
20
20
21
- const node2text = { 1 : n => n . assignedElements
22
- ? collectionText ( n . assignedElements ( ) ) || collectionText ( n . childNodes )
23
- : [ 'SCRIPT' , 'AUDIO' , 'STYLE' , 'CANVAS' , 'DATALIST' , 'EMBED' , 'OBJECT' , 'PICTURE' , 'IFRAME' , 'METER' , 'NOSCRIPT '
24
- , 'SELECT ', 'OPTGROUP ' , 'PROGRESS ' , 'TEMPLATE' , 'VIDEO' ]
25
- . includes ( n . nodeName ) ? ' '
26
- : n . innerText //collectionText(n.children)
21
+ const node2text = { 1 : n => n . assignedNodes
22
+ ? collectionText ( n . assignedNodes ( ) ) || collectionText ( n . childNodes )
23
+ : [ 'SCRIPT' , 'AUDIO' , 'STYLE' , 'CANVAS' , 'DATALIST' , 'EMBED' , 'OBJECT'
24
+ , 'PICTURE ', 'IFRAME ' , 'METER ' , 'NOSCRIPT'
25
+ , 'SELECT' , 'OPTGROUP' , 'PROGRESS' , 'TEMPLATE' , 'VIDEO '
26
+ ] . includes ( n . nodeName ) ? '' : n . innerText //collectionText(n.children)
27
27
, 3 : n => n . nodeValue
28
28
, 11 :n => collectionText ( n . children )
29
29
} ;
@@ -79,7 +79,7 @@ CssChainLocal extends Array
79
79
push ( ...args ) { Array . prototype . push . apply ( this , args ) ; return this ; }
80
80
querySelector ( css ) { return new CssChainLocal ( ) . push ( this . querySelectorAll ( css ) [ 0 ] ) }
81
81
querySelectorAll ( css ) { return this . reduce ( ( $ , el ) => $ . push ( ...el . querySelectorAll ( css ) ) , new CssChainLocal ( ) ) }
82
- $ ( ...args ) { return this . querySelectorAll ( ...args ) }
82
+ $ ( ...args ) { return args . length ? this . querySelectorAll ( ...args ) : this ; }
83
83
parent ( css )
84
84
{ const s = new Set ( )
85
85
, add = n => s . has ( n ) ? 0 : ( s . add ( n ) , n )
0 commit comments