@@ -47,7 +47,7 @@ export class Parse5DomAdapter extends DomAdapter {
47
47
setRootDomAdapter ( new Parse5DomAdapter ( ) ) ;
48
48
}
49
49
50
- hasProperty ( element : any , name : string ) : boolean {
50
+ hasProperty ( _element : any , name : string ) : boolean {
51
51
return _HTMLElementPropertyList . indexOf ( name ) > - 1 ;
52
52
}
53
53
// TODO(tbosch): don't even call this method when we run the tests on server side
@@ -75,7 +75,7 @@ export class Parse5DomAdapter extends DomAdapter {
75
75
76
76
get attrToPropMap ( ) { return _attrToPropMap ; }
77
77
78
- query ( selector : any ) { throw _notImplemented ( 'query' ) ; }
78
+ query ( _selector : any ) { throw _notImplemented ( 'query' ) ; }
79
79
querySelector ( el : any , selector : string ) : any { return this . querySelectorAll ( el , selector ) [ 0 ] ; }
80
80
querySelectorAll ( el : any , selector : string ) : any [ ] {
81
81
const res : any [ ] = [ ] ;
@@ -121,7 +121,7 @@ export class Parse5DomAdapter extends DomAdapter {
121
121
cssSelector . addClassName ( classList [ i ] ) ;
122
122
}
123
123
124
- matcher . match ( cssSelector , function ( selector : any , cb : any ) { result = true ; } ) ;
124
+ matcher . match ( cssSelector , function ( _selector : any , _cb : any ) { result = true ; } ) ;
125
125
}
126
126
return result ;
127
127
}
@@ -171,15 +171,15 @@ export class Parse5DomAdapter extends DomAdapter {
171
171
getInnerHTML ( el : any ) : string {
172
172
return parse5 . serialize ( this . templateAwareRoot ( el ) , { treeAdapter} ) ;
173
173
}
174
- getTemplateContent ( el : any ) : Node { return null ; }
174
+ getTemplateContent ( _el : any ) : Node { return null ; }
175
175
getOuterHTML ( el : any ) : string {
176
176
const fragment = treeAdapter . createDocumentFragment ( ) ;
177
177
this . appendChild ( fragment , el ) ;
178
178
return parse5 . serialize ( fragment , { treeAdapter} ) ;
179
179
}
180
180
nodeName ( node : any ) : string { return node . tagName ; }
181
181
nodeValue ( node : any ) : string { return node . nodeValue ; }
182
- type ( node : any ) : string { throw _notImplemented ( 'type' ) ; }
182
+ type ( _node : any ) : string { throw _notImplemented ( 'type' ) ; }
183
183
content ( node : any ) : string { return node . childNodes [ 0 ] ; }
184
184
firstChild ( el : any ) : Node { return el . firstChild ; }
185
185
nextSibling ( el : any ) : Node { return el . nextSibling ; }
@@ -313,7 +313,7 @@ export class Parse5DomAdapter extends DomAdapter {
313
313
}
314
314
getShadowRoot ( el : any ) : Element { return el . shadowRoot ; }
315
315
getHost ( el : any ) : string { return el . host ; }
316
- getDistributedNodes ( el : any ) : Node [ ] { throw _notImplemented ( 'getDistributedNodes' ) ; }
316
+ getDistributedNodes ( _el : any ) : Node [ ] { throw _notImplemented ( 'getDistributedNodes' ) ; }
317
317
clone ( node : Node ) : Node {
318
318
const _recursive = ( node : any ) => {
319
319
const nodeClone = Object . create ( Object . getPrototypeOf ( node ) ) ;
@@ -358,7 +358,7 @@ export class Parse5DomAdapter extends DomAdapter {
358
358
getElementsByClassName ( element : any , name : string ) : HTMLElement [ ] {
359
359
return this . querySelectorAll ( element , '.' + name ) ;
360
360
}
361
- getElementsByTagName ( element : any , name : string ) : HTMLElement [ ] {
361
+ getElementsByTagName ( _element : any , _name : string ) : HTMLElement [ ] {
362
362
throw _notImplemented ( 'getElementsByTagName' ) ;
363
363
}
364
364
classList ( element : any ) : string [ ] {
@@ -442,13 +442,13 @@ export class Parse5DomAdapter extends DomAdapter {
442
442
hasAttribute ( element : any , attribute : string ) : boolean {
443
443
return element . attribs && element . attribs . hasOwnProperty ( attribute ) ;
444
444
}
445
- hasAttributeNS ( element : any , ns : string , attribute : string ) : boolean { throw 'not implemented' ; }
445
+ hasAttributeNS ( _element : any , _ns : string , _attribute : string ) : boolean { throw 'not implemented' ; }
446
446
getAttribute ( element : any , attribute : string ) : string {
447
447
return element . attribs && element . attribs . hasOwnProperty ( attribute ) ?
448
448
element . attribs [ attribute ] :
449
449
null ;
450
450
}
451
- getAttributeNS ( element : any , ns : string , attribute : string ) : string { throw 'not implemented' ; }
451
+ getAttributeNS ( _element : any , _ns : string , _attribute : string ) : string { throw 'not implemented' ; }
452
452
setAttribute ( element : any , attribute : string , value : string ) {
453
453
if ( attribute ) {
454
454
element . attribs [ attribute ] = value ;
@@ -457,15 +457,15 @@ export class Parse5DomAdapter extends DomAdapter {
457
457
}
458
458
}
459
459
}
460
- setAttributeNS ( element : any , ns : string , attribute : string , value : string ) {
460
+ setAttributeNS ( _element : any , _ns : string , _attribute : string , _value : string ) {
461
461
throw 'not implemented' ;
462
462
}
463
463
removeAttribute ( element : any , attribute : string ) {
464
464
if ( attribute ) {
465
465
delete element . attribs [ attribute ] ;
466
466
}
467
467
}
468
- removeAttributeNS ( element : any , ns : string , name : string ) { throw 'not implemented' ; }
468
+ removeAttributeNS ( _element : any , _ns : string , _name : string ) { throw 'not implemented' ; }
469
469
templateAwareRoot ( el : any ) : any {
470
470
return this . isTemplateElement ( el ) ? treeAdapter . getTemplateContent ( el ) : el ;
471
471
}
@@ -482,7 +482,7 @@ export class Parse5DomAdapter extends DomAdapter {
482
482
return newDoc ;
483
483
}
484
484
defaultDoc ( ) : Document { return defDoc = defDoc || this . createHtmlDocument ( ) ; }
485
- getBoundingClientRect ( el : any ) : any { return { left : 0 , top : 0 , width : 0 , height : 0 } ; }
485
+ getBoundingClientRect ( _el : any ) : any { return { left : 0 , top : 0 , width : 0 , height : 0 } ; }
486
486
getTitle ( ) : string { return this . defaultDoc ( ) . title || '' ; }
487
487
setTitle ( newTitle : string ) { this . defaultDoc ( ) . title = newTitle ; }
488
488
isTemplateElement ( el : any ) : boolean {
@@ -556,7 +556,7 @@ export class Parse5DomAdapter extends DomAdapter {
556
556
getLocation ( ) : Location { throw 'not implemented' ; }
557
557
getUserAgent ( ) : string { return 'Fake user agent' ; }
558
558
getData ( el : any , name : string ) : string { return this . getAttribute ( el , 'data-' + name ) ; }
559
- getComputedStyle ( el : any ) : any { throw 'not implemented' ; }
559
+ getComputedStyle ( _el : any ) : any { throw 'not implemented' ; }
560
560
setData ( el : any , name : string , value : string ) { this . setAttribute ( el , 'data-' + name , value ) ; }
561
561
// TODO(tbosch): move this into a separate environment class once we have it
562
562
setGlobalVar ( path : string , value : any ) { setValueOnPath ( global , path , value ) ; }
@@ -566,15 +566,15 @@ export class Parse5DomAdapter extends DomAdapter {
566
566
getTransitionEnd ( ) : string { return 'transitionend' ; }
567
567
supportsAnimation ( ) : boolean { return true ; }
568
568
569
- replaceChild ( el : any , newNode : any , oldNode : any ) { throw new Error ( 'not implemented' ) ; }
570
- parse ( templateHtml : string ) { throw new Error ( 'not implemented' ) ; }
571
- invoke ( el : Element , methodName : string , args : any [ ] ) : any { throw new Error ( 'not implemented' ) ; }
572
- getEventKey ( event : any ) : string { throw new Error ( 'not implemented' ) ; }
569
+ replaceChild ( _el : any , _newNode : any , _oldNode : any ) { throw new Error ( 'not implemented' ) ; }
570
+ parse ( _templateHtml : string ) { throw new Error ( 'not implemented' ) ; }
571
+ invoke ( _el : Element , _methodName : string , _args : any [ ] ) : any { throw new Error ( 'not implemented' ) ; }
572
+ getEventKey ( _event : any ) : string { throw new Error ( 'not implemented' ) ; }
573
573
574
574
supportsCookies ( ) : boolean { return false ; }
575
- getCookie ( name : string ) : string { throw new Error ( 'not implemented' ) ; }
576
- setCookie ( name : string , value : string ) { throw new Error ( 'not implemented' ) ; }
577
- animate ( element : any , keyframes : any [ ] , options : any ) : any { throw new Error ( 'not implemented' ) ; }
575
+ getCookie ( _name : string ) : string { throw new Error ( 'not implemented' ) ; }
576
+ setCookie ( _name : string , _value : string ) { throw new Error ( 'not implemented' ) ; }
577
+ animate ( _element : any , _keyframes : any [ ] , _options : any ) : any { throw new Error ( 'not implemented' ) ; }
578
578
}
579
579
580
580
// TODO: build a proper list, this one is all the keys of a HTMLInputElement
0 commit comments