Skip to content

Commit

Permalink
add footer/nav/aside/article
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkie committed Jan 28, 2024
1 parent a71b693 commit cc96a92
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/living/nodes/SpatialDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ export class SpatialDocumentImpl<T extends NativeDocument = NativeDocument> exte
createElement(tagName: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'): HTMLHeadingElement;
createElement(tagName: 'section'): HTMLElement;
createElement(tagName: 'header'): HTMLElement;
createElement(tagName: 'footer'): HTMLElement;
createElement(tagName: 'nav'): HTMLElement;
createElement(tagName: 'aside'): HTMLElement;
createElement(tagName: 'article'): HTMLElement;

// Universal signature
createElement(tagName: string): Element;
createElement(tagName: string): Element {
Expand Down Expand Up @@ -870,6 +875,10 @@ export class SpatialDocumentImpl<T extends NativeDocument = NativeDocument> exte
return new HTMLHeadingElementImpl(this.#nativeDocument, [], { level: tagName });
case 'header':
case 'section':
case 'footer':
case 'nav':
case 'aside':
case 'article':
return new HTMLContentElement(this.#nativeDocument, [], {
localName: tagName,
});
Expand Down

0 comments on commit cc96a92

Please sign in to comment.