-
-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Description
There is a strange issue.Some extension may add dom when the page is created.So initialContent
won't be written to right place. Please help me. 😂😂😂
I think using doc.body.children.length
is not safe. Maybe props.initialContent
has empty body.
/*
* entension may create dom before following code run
* so doc.body.children.length will not be 0
**/
if (doc.body.children.length < 1) {
doc.open('text/html', 'replace');
doc.write(this.props.initialContent);
doc.close();
}
Metadata
Metadata
Assignees
Labels
No labels