Outerra forum
Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => JavaScript development => Topic started by: SteelRat on April 19, 2015, 01:20:01 pm
-
Hi cameni !
<!DOCTYPE html>
<html>
<head>
<title>Desktop sample</title>
<!-- File not loaded -->
<script type="text/javascript" src="file:///ptm/js/myJavaScript.js"></script>
<!-- File loaded -->
<script type="text/javascript" src="file:///www/js/myJavaScript.js"></script>
</head>
<body></body>
</html>
This can be circumvented without editing the contents of the folder "www"?
-
I think absolute paths in script tags are constrained to the www folder at the moment. It's a bit messy; ideally we would want to have UI addons located in data directory, but current Chromium version doesn't allow that.
-
Yes, it's my mistake.
If my call in console
window.open("../ptm/ui/desktop_console.html")
And call JScript in desktop_console.html
<script type="text/javascript" src="../js/myJavaScript.js"></script>
File loaded.
Thank cameni !