File tree Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const { registerHTMLClass} = require ( '../shared/register-html-class.js' ) ;
3
+ const { escapeHtmlTextContent} = require ( '../shared/text-escaper.js' ) ;
3
4
4
- const { TextElement } = require ( './text- element.js' ) ;
5
+ const { HTMLElement } = require ( './element.js' ) ;
5
6
6
7
const tagName = 'title' ;
7
8
8
9
/**
9
10
* @implements globalThis.HTMLTitleElement
10
11
*/
11
- class HTMLTitleElement extends TextElement {
12
+ class HTMLTitleElement extends HTMLElement {
12
13
constructor ( ownerDocument , localName = tagName ) {
13
14
super ( ownerDocument , localName ) ;
14
15
}
16
+
17
+ get innerHTML ( ) { return super . innerHTML ; }
18
+ set innerHTML ( html ) { super . innerHTML = escapeHtmlTextContent ( html ) ; }
15
19
}
16
20
17
21
registerHTMLClass ( tagName , HTMLTitleElement ) ;
Original file line number Diff line number Diff line change 1
1
import { registerHTMLClass } from '../shared/register-html-class.js' ;
2
+ import { escapeHtmlTextContent } from '../shared/text-escaper.js' ;
2
3
3
- import { TextElement } from './text- element.js' ;
4
+ import { HTMLElement } from './element.js' ;
4
5
5
6
const tagName = 'title' ;
6
7
7
8
/**
8
9
* @implements globalThis.HTMLTitleElement
9
10
*/
10
- class HTMLTitleElement extends TextElement {
11
+ class HTMLTitleElement extends HTMLElement {
11
12
constructor ( ownerDocument , localName = tagName ) {
12
13
super ( ownerDocument , localName ) ;
13
14
}
15
+
16
+ get innerHTML ( ) { return super . innerHTML ; }
17
+ set innerHTML ( html ) { super . innerHTML = escapeHtmlTextContent ( html ) ; }
14
18
}
15
19
16
20
registerHTMLClass ( tagName , HTMLTitleElement ) ;
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @implements globalThis.HTMLTitleElement
3
3
*/
4
- export class HTMLTitleElement extends TextElement implements globalThis . HTMLTitleElement {
4
+ export class HTMLTitleElement extends HTMLElement implements globalThis . HTMLTitleElement {
5
5
}
6
- import { TextElement } from './text- element.js' ;
6
+ import { HTMLElement } from './element.js' ;
Original file line number Diff line number Diff line change @@ -11405,10 +11405,13 @@ const tagName$9 = 'title';
11405
11405
/**
11406
11406
* @implements globalThis.HTMLTitleElement
11407
11407
*/
11408
- class HTMLTitleElement extends TextElement {
11408
+ class HTMLTitleElement extends HTMLElement {
11409
11409
constructor ( ownerDocument , localName = tagName$9 ) {
11410
11410
super ( ownerDocument , localName ) ;
11411
11411
}
11412
+
11413
+ get innerHTML ( ) { return super . innerHTML ; }
11414
+ set innerHTML ( html ) { super . innerHTML = escapeHtmlTextContent ( html ) ; }
11412
11415
}
11413
11416
11414
11417
registerHTMLClass ( tagName$9 , HTMLTitleElement ) ;
You can’t perform that action at this time.
0 commit comments