2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-05 12:57:52 +00:00
nativefier/docs
Dominic Hopton e064f765cb Fix CSS & JavaScript injection (Fixes #703, Fixes #731, PR #732)
* Fix for CSS Injection not working (#703)

Issue:
When using `onHeadersReceived`, the code was passing `null` for the filters.
This appears to trigger behaviour that matches _no_ urls at all.
This results in it never being called to inject the CSS.

Fix:
Pass an empty array instead. Now it's called for all URLs.

Tests pass & linting is clean

* Fix JavaScript injection (#731)

Issue:
It appears that on low endd evices (Core m3 MacBook), the attachment to
`DOMContentLoaded` happens _after_ the event has been raised, so does
not have a chance to inject the script.

Fix:
Move the attachment to the top of the file -- before the imports. This
triggers a bunch of linting erros, so also added disablement inplace.

Additional:
Clarified when the injected JS gets loaded, and what it can assume about
the DOM.
2019-01-01 23:38:45 -05:00
..
api.md Fix CSS & JavaScript injection (Fixes #703, Fixes #731, PR #732) 2019-01-01 23:38:45 -05:00
changelog.md Update changelog for v7.6.9 2018-12-01 14:07:47 -05:00
development.md Upgrade dependencies and default to latest Electron 1.7.9 (PR #483) 2017-11-14 08:05:01 -05:00
release.md Add jq to docs as release dependency 2017-05-21 20:42:36 +08:00