Software Archive
Read-only legacy content
17061 Discussions

importing head into Intel XDK

Remi_I_
Beginner
265 Views

I have this code at the top of my page

<link rel = "import" href="head.html">

This page contains all my CSS and plugin links that I need.

To keep my code neat I would prefer to use just the link tag.

This was all working in the emulator however when i tried to use the app preview on my android,window and apple device it does not load this tag.

I know this is the problem because when i put the code that is in the head.html page into the page I'm using it works.

Thanks for the help.

0 Kudos
1 Solution
PaulF_IntelCorp
Employee
265 Views

I suspect there is an issue with paths and protocols. See this comment > http://webcomponents.org/articles/introduction-to-html-imports/#comment-1813504891 < you are building a Cordova app, so whatever needs to be done in a Cordova or PhoneGap app to make this work is what you need to do with the XDK.

Also, the native Android webview is not likely to work on Android 4.4 and below, only on Android 5+, because it is not supported in those older webviews. In that case, you'll need to make sure you're using Crosswalk. Likewise, according to caniuse, it looks like it is probably not supported on iOS and Windows platforms.

View solution in original post

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
266 Views

I suspect there is an issue with paths and protocols. See this comment > http://webcomponents.org/articles/introduction-to-html-imports/#comment-1813504891 < you are building a Cordova app, so whatever needs to be done in a Cordova or PhoneGap app to make this work is what you need to do with the XDK.

Also, the native Android webview is not likely to work on Android 4.4 and below, only on Android 5+, because it is not supported in those older webviews. In that case, you'll need to make sure you're using Crosswalk. Likewise, according to caniuse, it looks like it is probably not supported on iOS and Windows platforms.

0 Kudos
Reply