Copy link to clipboard
Copied
I am totally confused.
When I open my panel, jquery doesn't want to load. If I then open debug and refresh debug window – jquery loads correctly.
I tried putting my <script> tags:
- in the <head>
- at the end of <body>
- with defer set
- with async set
Also tried different jquery versions
Nothing helps.
If I close and re-open my panel tab – jquery isn't there. If I refresh in debug – it's there.
Any ideas?
In manifest.xml
<CEFCommandLine>
<Parameter>--mixed-context</Parameter>
</CEFCommandLine>
In index.html
...<script>
if (typeof module === 'object') {
window.module = module;
module = undefined;
}
if (typeof exports === 'object') {
window.exports = exports;
exports = undefined;
}
if (typeof require === 'object') {
window.require = require;
require = undefined;
}
</script>
<script src="../js/libs/jquery-3.1.1.min.js"></script>
<script>
if (window.module) module = window.module;
if (window.expor
Copy link to clipboard
Copied
In manifest.xml
<CEFCommandLine>
<Parameter>--mixed-context</Parameter>
</CEFCommandLine>
In index.html
<script>
if (typeof module === 'object') {
window.module = module;
module = undefined;
}
if (typeof exports === 'object') {
window.exports = exports;
exports = undefined;
}
if (typeof require === 'object') {
window.require = require;
require = undefined;
}
</script>
<script src="../js/libs/jquery-3.1.1.min.js"></script>
<script>
if (window.module) module = window.module;
if (window.exports) exports = window.exports;
if (window.require) require = window.require;
</script>
I put mine in header but it's not crucial.
HTH
Trevor
Copy link to clipboard
Copied
That is some dark voodoo magic
Copy link to clipboard
Copied
You may want to look here, for the reason why dark voodoo magic works 🙂
Davide