In an attempt to skirt the following issues, https://bugs.chromium.org/p/chromium/issues/detail?id=321638, https://bugs.chromium.org/p/chromium/issues/detail?id=452685, and to make my Chrome packaged app work on Chrome 57+, I am loading an HTML page into the WebView as a data string, using FileReader()
and the readAsDataURL()
method.
The HTML file is your standard affair, containing references to external CSS and JS files.
Towards the bottom of the page, my JS scripts are called, again, pretty typical stuff, using <script src="../../shared/js/jquery-1.10.1.min.js"></script>
for example. (Please ignore the terrible pathing).
Now, it seems like the HTML file is loaded and parsed correctly, but I get the age old error of Uncaught ReferenceError: $ is not defined
.
Checking the erroneous line, it is in an inline (again, please don't shoot me) script that is after the jQuery script tag.
Are there any hidden caveats with loading HTML as a data string, specifically into a WebView?