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

Function checkComponentDefined

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

* Check if a component is *defined* for an entity, including defaults and mixins. * Does not check whether the component has been *initialized* for an entity. * * @param {string} el - Entity. * @param {string} name - Component name. * @returns {boolean}

(el, name)

Source from the content-addressed store, hash-verified

795 * @returns {boolean}
796 */
797function checkComponentDefined (el, name) {
798 // Check if element contains the component.
799 if (el.components[name] && el.components[name].attrValue) { return true; }
800
801 return isComponentMixedIn(name, el.mixinEls);
802}
803
804/**
805 * Check if any mixins contains a component.

Callers 2

initComponentMethod · 0.85
updateComponentMethod · 0.85

Calls 1

isComponentMixedInFunction · 0.85

Tested by

no test coverage detected