romancow / dimdom

A small, simple way to represent a DOM - a “diminished DOM”
MIT License
0 stars 0 forks source link

DimDom collection object #11

Closed romancow closed 8 years ago

romancow commented 8 years ago

Adds a DimDom collection object to encapsulate multiple DimDom items without a parent item

// create a new collection
var collection = new DimDom.Collection([
    new DimDom("p", "Some paragraph text"),
    "Some standalone text",
    document.createElement("div")
]);

// append collection to a document
collection.appendTo(someNode);

// use a collection as the children for a new DimDom instance
var parent = new DimDom("section", collection);

resolves #7