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
-
the ElementInternals is not supported and a polyfill is necessary
- Type
- Error
Members
# (static) formAssociated
- Since:
- 1.14.0
# 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
- Since:
- 1.14.0
# labels
This is a method of internal api
- Since:
- 1.14.0
# name
This is a method of internal api
# states
This is a method of internal api
- Since:
- 1.14.0
# type
This is a method of internal api
# validationMessage
This is a method of internal api
- Since:
- 1.14.0
# validity
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
- Since:
- 1.14.0
Methods
# checkValidity() → {boolean}
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
- 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);
Name | Type | Description |
---|---|---|
value |
File | string | FormData | |
state |
File | string | FormData |
- 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 | undefined | |
anchor |
HTMLElement |
- Since:
- 1.14.0
-
-
NotSupportedError
- Type
- DOMException
-
-
-
the ElementInternals is not supported and a polyfill is necessary
- Type
- Error
-
- Type
- undefined