Skip to content

createNodesFromMarkup renders with global document #3146

@syranide

Description

@syranide

Apparently we support rendering into iframes (@petehunt), but we always render new markup into the global document and then move rendered elements into the iframe document afterwards. JSDOM throws Wrong document if you try to do this but browsers don't seem to mind.

However, apart from perhaps not being very nice for various reasons, it seems to affect performance significantly: http://jsperf.com/renderdoc2 IE11 drops down to 33% performance and FF drops to about 20% (!) when rendering into the global document and moving rather than rendering directly into the iframe document.

This is easily solved everywhere except for processUpdates as renders into different documents are batched as well?

cc @spicyj @zpao

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions