Constructor
new CustomControl()
A base class for customcontrols based on CustomElement
IMPORTANT: CustomControls instances are not created via the constructor, but either via a tag in the HTML or via document.createElement()
.
- Since
- 1.14.0
- Copyright
- schukai GmbH
- License
- AGPLv3
the ElementInternals is not supported and a polyfill is necessary
- Type
- Error
Members
defaults
Derived classes can override and extend this method as follows.
get defaults() {
return extends{}, super.defaults, {
myValue:true
});
}
- Since
- 1.14.0
form
This is a method of internal api
.This is a method of internal api
- Since
- 1.14.0
labels
This is a method of internal api
.This is a method of internal api
- Since
- 1.14.0
name
This is a method of internal api
.This is a method of internal api
states
This is a method of internal api
.This is a method of internal api
- Since
- 1.14.0
type
This is a method of internal api
.This is a method of internal api
validationMessage
This is a method of internal api
.This is a method of internal api
- Since
- 1.14.0
validity
This is a method of internal api
.This is a method of internal api
value
Must be overridden by a derived class and return the value of the control.
This is a method of internal api
- Since
- 1.14.0
value
Must be overridden by a derived class and return the value of the control.
This is a method of internal api
- Since
- 1.14.0
willValidate
This is a method of internal api
.This is a method of internal api
- Since
- 1.14.0
(static) formAssociated
- Since
- 1.14.0
(static) instanceSymbol
instanceof
operator.This method is called by the instanceof
operator.
- Since
- 2.1.0
(static) observedAttributes
attributeChangedCallback()
.This method determines which attributes are to be monitored by attributeChangedCallback()
.
- Since
- 1.15.0
Methods
checkValidity() → {boolean}
This is a method of internal api
.This is a method of internal api
- Since
- 1.14.0
NotSupportedError
- Type
- DOMException
the ElementInternals is not supported and a polyfill is necessary
- Type
- Error
- Type:
- boolean
reportValidity() → {boolean}
This is a method of internal api
.This is a method of internal api
- Since
- 1.14.0
the ElementInternals is not supported and a polyfill is necessary
- Type
- Error
NotSupportedError
- Type
- DOMException
- Type:
- boolean
setFormValue(value, state) → {undefined}
This is a method of internal api
// Use the control's name as the base name for submitted data
const n = this.getAttribute('name');
const entries = new FormData();
entries.append(n + '-first-name', this.firstName_);
entries.append(n + '-last-name', this.lastName_);
this.setFormValue(entries);
.This is a method of internal api
// Use the control's name as the base name for submitted data
const n = this.getAttribute('name');
const entries = new FormData();
entries.append(n + '-first-name', this.firstName_);
entries.append(n + '-last-name', this.lastName_);
this.setFormValue(entries);
Name | Type | Description |
---|---|---|
value | File | | |
state | File | |
- Since
- 1.14.0
NotSupportedError
- Type
- DOMException
the ElementInternals is not supported and a polyfill is necessary
- Type
- Error
- Type:
- undefined
setValidity(flags, message, anchor) → {undefined}
Name | Type | Description |
---|---|---|
flags | object | |
message | string | | |
anchor | HTMLElement |
- Since
- 1.14.0
NotSupportedError
- Type
- DOMException
the ElementInternals is not supported and a polyfill is necessary
- Type
- Error
- Type:
- undefined