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

Not able to get rendered DOM markup #1794

Closed
VoidMonk opened this issue Mar 30, 2017 · 2 comments
Closed

Not able to get rendered DOM markup #1794

VoidMonk opened this issue Mar 30, 2017 · 2 comments

Comments

@VoidMonk
Copy link

Hey guys, I'm trying to load a simple test page in jsdom, that prints the current date-time (via inline JS) after a 2 second delay, but I'm not able to get the rendered DOM markup with the printed date-time.

Here's the test page output: http://output.jsbin.com/cikahogoku
Here's the test page code: http://jsbin.com/cikahogoku/edit?html,js,output

In nodejs, I'm not able to see the date-time from the DOM output using jsdom.serializeDocument(window.document) which is triggered 10 seconds after the jsdom done event.

Any clues?!

@Zirro
Copy link
Member

Zirro commented Mar 30, 2017

You can use textContent instead of innerText. innerText was only recently standardised, and is currently not implemented in jsdom since it requires a layout engine to behave as a regular browser would (see issue #1245).

@Zirro
Copy link
Member

Zirro commented Apr 24, 2017

I believe this issue can be closed in favour of #1245.

@domenic domenic closed this as completed Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants