(args = null)
| 1 | export class BaseComponent extends HTMLDivElement{ |
| 2 | constructor(args = null) |
| 3 | { |
| 4 | let componentType = 'component'; |
| 5 | if(args) |
| 6 | { |
| 7 | componentType = args.type ?? 'component'; |
| 8 | } |
| 9 | |
| 10 | let element = document.createElement('div'); |
| 11 | Object.setPrototypeOf(element, BaseComponent.prototype); |
| 12 | |
| 13 | return Object.assign(element, { |
| 14 | componentType |
| 15 | }); |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Insert the current component after the specified component parameter. |
nothing calls this directly
no outgoing calls
no test coverage detected