A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

Add src attribute to template

bahrus
2018-04-24

Add src attribute to the template tag, similar to script tag (but for HTML content). Add onload event.

simevidas
2018-04-29

How this functionality (loading an external template into a web app) be achieved currently?

Malvoz
2018-05-14

A client side include feature for HTML?

bahrus
2019-12-07

I’ve spelled out this proposal in more detail here. I switched from src to href because it reads more natural to me.

trusktr
2019-12-08

What does href even stand for? src obviously stands for “source”. I dislike cryptic tag names like rel or href, and even src is cryptic but it is obvious and so commonly used (not just in HTML) that I think that one is fine.

Like, I don’t understand why there isn’t <style src="path/to/style.css">, and only <link href="path/to/style.css">. It’s just weird!

bahrus
2019-12-08

I share with you an aversion to all the cryptic syntax. In this case, I was thinking of src or href due to the sheer volume of precedent, which has caused IDE’s to hyperlink those attributes, and also I wonder if search engines already have blanket rules in place that recognize the attribute?