forked from Aricwithana/LCARS-SDK
-
Notifications
You must be signed in to change notification settings - Fork 2
LCARS.create
crstmkt edited this page Oct 7, 2020
·
2 revisions
Return: New Constructor Prototype Instance Reference of the created object stored under:
LCARS.active['idOfElement']
LCARS.active.idOfElement
log: {data: {…}, receiver: {…}, event: {…}, broadcast: {…}, delete: {…}, …}
//Basic Usage
var element = LCARS.create({type:'button', color:'bg-blue-1', label:'Button'});
//Append To Body
$('body').append( LCARS.create({type:'button', color:'bg-blue-1', label:'Button'}).dom );
//Create From Array - Returns Array of Active Prototype Instances
var aElements = LCARS.create([
{type:'button', color:'bg-blue-1', label:'Button'},
{type:'button', color:'bg-blue-1', label:'Button'}
]);