Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jsdom to support document.createRange #46

Closed
markocikos opened this issue Apr 20, 2020 · 1 comment
Closed

Update jsdom to support document.createRange #46

markocikos opened this issue Apr 20, 2020 · 1 comment

Comments

@markocikos
Copy link
Member

In several places we are using fragment appending to achieve execution of scripts within appended HTML:

const fragment = document.createRange().createContextualFragment(html);

element.appendChild(fragment);

Jest does not support testing this, throwing error that createRange is not defined.

@wincent analysed this here:

We'll get support for createRange in a future update of jsdom:

It's in v16.0.0.

However, I don't think we can update yet because of performance problems:

facebook/jest#9457

@wincent wincent transferred this issue from liferay/liferay-npm-tools Sep 25, 2020
@wincent
Copy link
Contributor

wincent commented Nov 12, 2020

See also: #234

When we do update, we'll be able to remove that mock.

wincent added a commit that referenced this issue Dec 18, 2020
docs: correct "json" to "JSON"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants