Add src attribute to template

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

2 Likes

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

A client side include feature for HTML?

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

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!

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?