MCPcopy Index your code
hub / github.com/aframevr/aframe / attributeChangedCallback

Method attributeChangedCallback

src/core/a-entity.js:46–59  ·  view source on GitHub ↗

* Handle changes coming from the browser DOM inspector.

(attr, oldVal, newVal)

Source from the content-addressed store, hash-verified

44 * Handle changes coming from the browser DOM inspector.
45 */
46 attributeChangedCallback (attr, oldVal, newVal) {
47 var component = this.components[attr];
48
49 super.attributeChangedCallback();
50 // If the empty string is passed by the component initialization
51 // logic we ignore the component update.
52 if (component && component.justInitialized && newVal === '') {
53 delete component.justInitialized;
54 return;
55 }
56 // When a component is removed after calling el.removeAttribute('material')
57 if (!component && newVal === null) { return; }
58 this.setEntityAttribute(attr, oldVal, newVal);
59 }
60
61 doConnectedCallback () {
62 var self = this; // Component.

Callers

nothing calls this directly

Calls 1

setEntityAttributeMethod · 0.95

Tested by

no test coverage detected