Search code examples
javascriptexternaltizentizen-web-app

Unable to load a external javascript file in a Tizen Web application


I'm trying to do something very basic - including an external JS File, but I can't get it to work.

Relevant HTML

<head>
<script src="https://openlayers.org/en/v4.1.1/build/ol.js"></script>
</head>

config.xml

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/dezedan" version="1.0.0" viewmodes="maximized">
    <access origin="*" subdomains="true"/>
    <access origin="https://openlayers.org/" subdomains="true"/>
    <tizen:application id="iFnT8pQIzT.dezedan" package="iFnT8pQIzT" required_version="3.0"/>
    <content src="index.html"/>
    <feature name="http://tizen.org/feature/screen.size.all"/>
    <icon src="icon.png"/>
    <name>test</name>
    <tizen:privilege name="http://tizen.org/privilege/internet"/>
    <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
    <tizen:profile name="wearable"/>
</widget>

things I've tried including in config.xml (unsuccessfully)

<access origin="http://openlayers.org/" subdomains="true"/>
<access origin="https://openlayers.org/en/v4.1.1/build/ol.js" subdomains="true"/>
<access origin="http://openlayers.org/en/v4.1.1/build/ol.js" subdomains="true"/>

As far as I see can I'm doing everything correctly; but obviously I'm missing something! It would be greatly appreciated if anyone could shed some light on what I'm missing.


Solution

  • Use this

    <script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/4.1.1/ol.js"</script>
    

    Instead of

    <script src="https://openlayers.org/en/v4.1.1/build/ol.js"></script>