Skip to content

use DOM fragments instead of always creating elements #397

@jasongrout

Description

@jasongrout

Taking a tip from William, it may be marginally faster and (more importantly) separates content/presentation better to use DOM fragments and cloning rather than creating elements (for example, for interact controls, or anywhere else we use the "ce" function). See http://ejohn.org/blog/dom-documentfragments/
For example (as a tip from William), load a lot of hidden divs/spans that contain DOM fragments for each interact control, etc. Clone these as needed and insert them into the DOM where needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions