Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually inline external scripts instead of executing them via jsdom
jsdom does not implement layout-specific functionality like offsetWidth() or getBoundingClientRect() (see jsdom/jsdom#653, jsdom/jsdom#135). The good news is that jsdom doesn't need to be used at all. Instead, the HTML file can be imported directly, and any external scripts or stylesheets can be inlined as well. PhantomJS will render the resulting HTML without issue, since it's using WebKit behind the scenes.
- Loading branch information
1 parent
ea01b01
commit 080c9c0
Showing
2 changed files
with
42 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters