ndf-elements
Version:
My collection of useful custom elements.
29 lines (22 loc) • 633 B
JavaScript
/**
* Set configuration options, including templateHost.
*
* @copyright © Nick Freear, 11-Dec-2021.
* @see ../demo/my-options.html
* @status beta
* @since 1.0.0
*/
import { MyElement } from '../MyElement.js';
import { setupOptions } from '../Options.js';
export class MyOptionsElement extends MyElement {
static getTag () {
return 'my-options';
}
async connectedCallback () {
const templateHost = this.getAttribute('template-host') || 'local';
const use = this.getAttribute('use');
this.$$ = { templateHost, use };
setupOptions(this.$$);
console.debug('my-options:', this.$$, this);
}
}