MCPcopy
hub / github.com/aframevr/aframe / getDOMAttribute

Method getDOMAttribute

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

* If `attr` is a component, returns JUST the component data defined on the entity. * Like a partial version of `getComputedAttribute` as returned component data * does not include applied mixins or defaults. * * If `attr` is not a component, fall back to HTML getAttribute. * * @par

(attr)

Source from the content-addressed store, hash-verified

736 * @returns {object|string} Object if component, else string.
737 */
738 getDOMAttribute (attr) {
739 // If cached value exists, return partial component data.
740 var component = this.components[attr];
741 if (component) { return component.attrValue; }
742 return window.HTMLElement.prototype.getAttribute.call(this, attr);
743 }
744
745 addState (state) {
746 if (this.is(state)) { return; }

Callers 4

updateComponentsMethod · 0.95
mixinUpdateMethod · 0.95
a-entity.test.jsFile · 0.45
a-scene.test.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected