@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
24 lines (23 loc) • 590 B
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
function throwNoStateAccess() {
throw new Error('This controller does not use component state.');
}
export class BaseWebComponent {
constructor() {
this.stateAccess = {
setState: (key, value) => {
this[key] = value;
},
getState: (key) => {
return this[key];
},
};
}
}
BaseWebComponent.stateLess = Object.freeze({
setState: throwNoStateAccess,
getState: throwNoStateAccess,
});
//# sourceMappingURL=base-web-component.js.map