html-imports Questions

3

Solved

I have defined a custom element and I want to execute a script only when the custom element is upgraded to its registered type. The use case is that I must call a custom method. My main html file ...

2

Since Html-Imports are now deprecated in Chrome (https://www.chromestatus.com/feature/5144752345317376) and will be removed, I wonder what the alternatives are. I'm currently using Html-Imports to...

6

Solved

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 Chro...
Micronucleus asked 12/7, 2013 at 10:4

2

Solved

According to http://blog.teamtreehouse.com/introduction-html-imports To enable HTML imports in Chrome, go to chrome://flags and enable the Enable HTML Imports flag. Once you’re done, click the R...
Indopacific asked 22/12, 2015 at 5:16

0

There seems to be many dated questions on this topic, I cant find one more recent (2018). Also other questions just focus on getting this to work, I am focused on the right path forward for m...
Odontoid asked 8/11, 2018 at 19:16

1

Solved

If I understand it correctly, creating an instance of a web component can be summed up as creating a shadow root and copying the markup, e.g. from a template into it: var Template = document.query...

1

Solved

Is it better to use html template (and then html import) to create web components or to use template string? What are pros and cons of these methods?
Pseudocarp asked 13/1, 2017 at 14:39

1

Solved

I made a simple example using Web Components with two custom elements (v1) where one is nested in another. index.html: <!DOCTYPE html> <html> <head> <meta charset="utf-8">...

1

Solved

I have a banner html with a bunch of buttons(i.e. home, about,..etc.) that I'd like to set as a template. On my unique pages(say the home page), I'd like to "import" this template html file. How do...
Carloscarlota asked 6/10, 2016 at 3:41

3

Solved

I am working with HTML <template> elements. Code-wise, it seems inconvenient to keep the correct set of templates inside each HTML file. Is it possible to put templates in a separate file? I ...
Gewirtz asked 17/11, 2015 at 4:34

1

Solved

I'm working on my first X-Tag application and on it's page it says it's meant to work with Web Component API's such as 'Custom Elements, Shadow DOM, Templates, and HTML Imports'. I've started work...
Capote asked 20/5, 2016 at 11:27

1

So the first fact section in this HTML import article states that html imports know better than to request (and execute - if javascript) resources multiple times. This works within the framework ...
Shank asked 11/3, 2015 at 17:30
1

© 2022 - 2024 — McMap. All rights reserved.