Apple’s Proposal for HTML Template Instantiation

Home » NewsBlog » Apple’s Proposal for HTML Template Instantiation

Apple’s Proposal for HTML Template Instantiation

I’m sure I don’t have the expertise to understand the finer nuances of this, but I like the spirit:

The HTML5 specification defines the template element but doesn’t provide a native mechanism to instantiate it with some parts of it substituted, conditionally included, or repeated based on JavaScript values — as popular JavaScript frameworks such as Ember.js and Angular allow. As a consequence, there are many incompatible template syntaxes and semantics to do substitution and conditionals within templates — making it hard for web developers to combine otherwise reusable components when they use different templating libraries.

Whilst previously we all decided to focus on shadow DOM and the custom-elements API first, we think the time is right — now that shadow DOM and custom-elements API have been shipping in Safari and Chrome and are in development in Firefox — to propose and standardize an API to instantiate HTML templates.

Let the frameworks compete on speed and developer convenience in other ways.

Direct Link to ArticlePermalink


Apple’s Proposal for HTML Template Instantiation is a post from CSS-Tricks

CSS Tricks Go to Source
Author: Chris Coyier

Powered by WPeMatico

2017-11-07T03:01:34+00:00