defaultkavy
7f8f599b8a
new: $HTMLElementAPIs optimize: collect utilty method of HTMLElement and merge into different $Element
18 lines
864 B
TypeScript
18 lines
864 B
TypeScript
import { $Container, $ContainerOptions } from "./$Container";
|
|
import { $StateArgument } from "../$State";
|
|
import { $HTMLElementAPIFilter, $HTMLElementAPIs } from "../$ElementTemplate";
|
|
import { $Util } from "../$Util";
|
|
|
|
export interface $OptGroupOptions extends $ContainerOptions {}
|
|
export class $OptGroup extends $Container<HTMLOptGroupElement> {
|
|
constructor(options?: $OptGroupOptions) {
|
|
super('optgroup', options);
|
|
}
|
|
|
|
disabled(): boolean;
|
|
disabled(disabled: $StateArgument<boolean> | undefined): this;
|
|
disabled(disabled?: $StateArgument<boolean> | undefined) { return $.fluent(this, arguments, () => this.dom.disabled, () => $.set(this.dom, 'disabled', disabled))}
|
|
}
|
|
|
|
export interface $OptGroup extends $HTMLElementAPIFilter<$OptGroup, 'disabled' | 'label'> {}
|
|
$Util.mixin($OptGroup, $HTMLElementAPIs.create('disabled', 'label')) |