File tree Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22const { registerHTMLClass} = require ( '../shared/register-html-class.js' ) ;
3+ const { escapeHtmlTextContent} = require ( '../shared/text-escaper.js' ) ;
4+ const { ignoreCase} = require ( '../shared/utils.js' ) ;
35
4- const { TextElement } = require ( './text- element.js' ) ;
6+ const { HTMLElement } = require ( './element.js' ) ;
57
68const tagName = 'title' ;
79
810/**
911 * @implements globalThis.HTMLTitleElement
1012 */
11- class HTMLTitleElement extends TextElement {
13+ class HTMLTitleElement extends HTMLElement {
1214 constructor ( ownerDocument , localName = tagName ) {
1315 super ( ownerDocument , localName ) ;
1416 }
17+
18+ get innerHTML ( ) { return super . innerHTML ; }
19+ set innerHTML ( html ) { super . innerHTML = ignoreCase ( this ) ? escapeHtmlTextContent ( html ) : html ; }
1520}
1621
1722registerHTMLClass ( tagName , HTMLTitleElement ) ;
Original file line number Diff line number Diff line change 11import { registerHTMLClass } from '../shared/register-html-class.js' ;
2+ import { escapeHtmlTextContent } from '../shared/text-escaper.js' ;
3+ import { ignoreCase } from '../shared/utils.js' ;
24
3- import { TextElement } from './text- element.js' ;
5+ import { HTMLElement } from './element.js' ;
46
57const tagName = 'title' ;
68
79/**
810 * @implements globalThis.HTMLTitleElement
911 */
10- class HTMLTitleElement extends TextElement {
12+ class HTMLTitleElement extends HTMLElement {
1113 constructor ( ownerDocument , localName = tagName ) {
1214 super ( ownerDocument , localName ) ;
1315 }
16+
17+ get innerHTML ( ) { return super . innerHTML ; }
18+ set innerHTML ( html ) { super . innerHTML = ignoreCase ( this ) ? escapeHtmlTextContent ( html ) : html ; }
1419}
1520
1621registerHTMLClass ( tagName , HTMLTitleElement ) ;
Original file line number Diff line number Diff line change 11/**
22 * @implements globalThis.HTMLTitleElement
33 */
4- export class HTMLTitleElement extends TextElement implements globalThis . HTMLTitleElement {
4+ export class HTMLTitleElement extends HTMLElement implements globalThis . HTMLTitleElement {
55}
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';
1140511405/**
1140611406 * @implements globalThis.HTMLTitleElement
1140711407 */
11408- class HTMLTitleElement extends TextElement {
11408+ class HTMLTitleElement extends HTMLElement {
1140911409 constructor ( ownerDocument , localName = tagName$9 ) {
1141011410 super ( ownerDocument , localName ) ;
1141111411 }
11412+
11413+ get innerHTML ( ) { return super . innerHTML ; }
11414+ set innerHTML ( html ) { super . innerHTML = ignoreCase ( this ) ? escapeHtmlTextContent ( html ) : html ; }
1141211415}
1141311416
1141411417registerHTMLClass ( tagName$9 , HTMLTitleElement ) ;
You can’t perform that action at this time.
0 commit comments