StructureJS

0.15.2

A class based utility library for building modular and scalable web platform applications. Features opt-in classes and utilities which provide a solid foundation and toolset to build your next project.

ComponentFactory Class

Module: util
Parent Module: StructureJS

A helper class to create multiple instances of the same Component Class from jQuery object that has one or more elements in it.

Index

Show:

Methods

Methods

_createComponent () private

Helper method to create the component.

create
(
  • $element
  • ComponentClass
  • [scope=null]
)
Array. public static

Takes a jQuery object that has one or more elements in it and passes a single jQuery element into the constructor of the class that is also being passed in.

Parameters:

  • $element JQuery

    One or more jQuery referenced DOM elements.

  • ComponentClass Any

    The class that you want instantiated.

  • [scope=null] DisplayObjectContainer optional

    This scope (parent object) is needed to instantiate the component/view with the use of the addChild method.

Returns:

Array.:

Returns a list of instantiated components/views so you can manage them within the Class that created them.

Example:

 ComponentFactory.create($('.js-list'), SomeClass, this);

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy