When opening an example through the `file:`-protocol, e.g. `file:///ol3/examples/full-screen.html` our `loader.js` would inject a `<script>` tag with a `src` pointing to an illegal URL `http://:9810/compile?mode=ADVANCED&id=full-screen`. This changes the respective logic, so that in the case that we are accessed through the `file:`-protocol, we fallback to using `localhost` as hostname for the plovr-compiler. The examples that do not use XHR (like e.g. `wms-capabilities.html`) now work as expected when accessed through `file:`-protocol.
1.9 KiB
1.9 KiB