I am trying to import an HTML document into my main document using
<link rel="import" href="my-tabs.html">
but it doesn't seem to be working.
I am following this presentation, using Chrome 28, and I have enabled these two flags in about:flags
:
Enable experimental WebKit features
Enable experimental JavaScript
Am I missing something? or is there another flag I need to enable to get it?
For latecomers:
Due to uncertainty about this feature, I would not recommend its usage.
My recommendation: Add a data- attribute to html imports. Write a script that runs on all those elements with that attribute and access those html parts using fetch()
in the script. Create a div and add that fetched import to that div at the same place. Essentially, add some JS based post processing that will download the html and inset into the same place as the import, replacing it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With