UNPKG

@protorians/widgets

Version:

Create your web user interfaces with widgets

21 lines (20 loc) 426 B
export class RefWidget { widget; get current() { return this.widget; } attach(widget) { if (typeof this.widget !== 'undefined') return this; this.widget = widget; return this; } detach() { if (typeof this.widget === 'undefined') return; this.widget = undefined; } } export function createRef() { return new RefWidget(); }