* Do not override this method in derivatives of UI5Element * @private
(name: string, oldValue: string | null, newValue: string | null)
| 686 | * @private |
| 687 | */ |
| 688 | attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) { |
| 689 | let newPropertyValue: PropertyValue; |
| 690 | if (this._doNotSyncAttributes.has(name)) { // This attribute is mutated internally, not by the user |
| 691 | return; |
| 692 | } |
| 693 | |
| 694 | const properties = (this.constructor as typeof UI5Element).getMetadata().getProperties(); |
| 695 | const realName = name.replace(/^ui5-/, ""); |
| 696 | const nameInCamelCase = kebabToCamelCase(realName); |
| 697 | if (properties.hasOwnProperty(nameInCamelCase)) { // eslint-disable-line |
| 698 | const propData = properties[nameInCamelCase]; |
| 699 | |
| 700 | const converter = propData.converter ?? defaultConverter; |
| 701 | newPropertyValue = converter.fromAttribute(newValue, propData.type); |
| 702 | |
| 703 | (this as Record<string, any>)[nameInCamelCase] = newPropertyValue; |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | formAssociatedCallback() { |
| 708 | const ctor = this.constructor as typeof UI5Element; |
nothing calls this directly
no test coverage detected
searching dependent graphs…