Last active
November 18, 2017 11:54
-
-
Save fisknils/477fcfed0a37c99cdaf3d937a2883f43 to your computer and use it in GitHub Desktop.
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
// including jquery in your electron body. | |
// | |
// https://stackoverflow.com/questions/32621988/electron-jquery-is-not-defined | |
// https://stackoverflow.com/a/37480521/4023754 | |
<!-- Insert this line above script imports --> | |
if (typeof module === 'object') {window.module = module; module = undefined;} | |
<!-- normal script imports etc --> | |
[ | |
"https://code.jquery.com/jquery-2.2.4.min.js" | |
].forEach((src){ | |
let script = document.createElement('script'); | |
script.src = src; | |
document.querySelector('head').appendChild(script); | |
}); | |
<!-- Insert this line after script imports --> | |
<script>if (window.module) module = window.module; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment