This was puzzling for me too when I first noticed it in CocoonJS, but this is in fact a Cordova thing, not a Crosswalk thing, and it's "normal". Using Javascript code, "/" will start in "file://", not the "www/" directory.

On 2015-01-08 13:01, Kevin Allen wrote:
We're continuing to explore Crosswalk as a potential platform, and
I've run into something very odd.

I'm currently packaging up a page using the Python make_apk script as
a way to quickly evaluate whether Crosswalk functions for what we're
going to need in the future.  The packaging seems to go fine - all
the other files (scrips, CSS, etc) end up in the appropriate relative
directories in the apk (specifically, starting at /assets/www/... and
on down).

But when it runs on the device, the base location of the starting HTML
file doesn't seem to be factored in.  Instead, it's using file:// as
a base.  I've tried a number of relative path specifications,
including starting with / and just the file name, pulling everything
from subdirectories into the single base directory, and the result is
the same.  If I reference the file as /android_assets/www/<file> it
works.

I'm not hugely experienced with JS/HTML stuff, but even consulting
with several people here who are, we're at a loss.  I've hunted
through options for make_apk, and can't seem to find anything.

What am I missing?
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to