| 32 | } |
| 33 | |
| 34 | export class RRDocument extends BaseRRDocument implements IRRDocument { |
| 35 | readonly nodeName = '#document' as const; |
| 36 | private _nwsapi: NWSAPI | undefined; |
| 37 | get nwsapi(): NWSAPI { |
| 38 | if (!this._nwsapi) { |
| 39 | // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call |
| 40 | this._nwsapi = nwsapi({ |
| 41 | document: this as unknown as Document, |
| 42 | DOMException: null as unknown as new ( |
| 43 | message?: string, |
| 44 | name?: string, |
| 45 | ) => DOMException, |
| 46 | }) as NWSAPI; |
| 47 | this._nwsapi.configure({ |
| 48 | LOGERRORS: false, |
| 49 | IDS_DUPES: true, |
| 50 | MIXEDCASE: true, |
| 51 | }); |
| 52 | } |
| 53 | return this._nwsapi; |
| 54 | } |
| 55 | |
| 56 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
| 57 | // @ts-ignore |
| 58 | get documentElement(): RRElement | null { |
| 59 | return super.documentElement as RRElement | null; |
| 60 | } |
| 61 | |
| 62 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
| 63 | // @ts-ignore |
| 64 | get body(): RRElement | null { |
| 65 | return super.body as RRElement | null; |
| 66 | } |
| 67 | |
| 68 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
| 69 | // @ts-ignore |
| 70 | get head() { |
| 71 | return super.head as RRElement | null; |
| 72 | } |
| 73 | |
| 74 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
| 75 | // @ts-ignore |
| 76 | get implementation(): RRDocument { |
| 77 | return this; |
| 78 | } |
| 79 | |
| 80 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
| 81 | // @ts-ignore |
| 82 | get firstElementChild(): RRElement | null { |
| 83 | return this.documentElement; |
| 84 | } |
| 85 | |
| 86 | appendChild(childNode: BaseRRNode) { |
| 87 | return super.appendChild(childNode); |
| 88 | } |
| 89 | |
| 90 | insertBefore(newChild: BaseRRNode, refChild: BaseRRNode | null) { |
| 91 | return super.insertBefore(newChild, refChild); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…