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

Method initComponentDependencies

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

* Initialize dependencies of a component. * * @param {string} name - Root component name.

(name)

Source from the content-addressed store, hash-verified

320 * @param {string} name - Root component name.
321 */
322 initComponentDependencies (name) {
323 var self = this;
324 var component = COMPONENTS[name];
325 var dependencies;
326 var i;
327
328 // Not a component.
329 if (!component) { return; }
330
331 // No dependencies.
332 dependencies = COMPONENTS[name].dependencies;
333
334 if (!dependencies) { return; }
335
336 // Initialize dependencies.
337 for (i = 0; i < dependencies.length; i++) {
338 // Call getAttribute to initialize the data from the DOM.
339 self.initComponent(
340 dependencies[i],
341 window.HTMLElement.prototype.getAttribute.call(self, dependencies[i]) || undefined,
342 true
343 );
344 }
345 }
346
347 removeComponent (name, destroy) {
348 var component;

Callers 1

initComponentMethod · 0.95

Calls 1

initComponentMethod · 0.80

Tested by

no test coverage detected