Skip to content

Work around debug being loaded in preload scripts#368

Merged
thebigredgeek merged 1 commit intodebug-js:masterfrom
anaisbetts:electron-preload
Dec 14, 2016
Merged

Work around debug being loaded in preload scripts#368
thebigredgeek merged 1 commit intodebug-js:masterfrom
anaisbetts:electron-preload

Conversation

@anaisbetts
Copy link
Copy Markdown
Contributor

This is a follow-on to #324, where if debug is loaded in a preload script (https://github.com/electron/electron/blob/d6e3360aeff6c50820a08af28f1097a0c25d6e3e/docs/api/web-view-tag.md#preload), it will crash in useColors because the DOM is not fully set-up yet (window.document.documentElement will be undefined, but window.document exists)

@thebigredgeek
Copy link
Copy Markdown
Contributor

#369 < wondering if this is the same issue?

@thebigredgeek thebigredgeek merged commit 69480c3 into debug-js:master Dec 14, 2016
@anaisbetts
Copy link
Copy Markdown
Contributor Author

anaisbetts commented Dec 15, 2016

@thebigredgeek Doesn't look like it but might be related? The callstack for us was trying to access style of null (aka document not null, but document.documentElement is null)

@anaisbetts anaisbetts deleted the electron-preload branch December 15, 2016 00:52
@anaisbetts
Copy link
Copy Markdown
Contributor Author

@thebigredgeek If you could cut a release off of this we'd be v grateful, this debug issue is causing us a lot of grief over at Slack because we use it in lots of low-level components that aren't easily patched

@thebigredgeek
Copy link
Copy Markdown
Contributor

@paulcbetts done :). 2.4.4 now live

@anaisbetts
Copy link
Copy Markdown
Contributor Author

Thank you so much!

@thebigredgeek
Copy link
Copy Markdown
Contributor

Np! Good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants