Start a new topic

Please create a HTMLTemplateElement

Right now if i wanna use <template> tags, i have to do 

HTMLElement template_el = document.getElementById("mytemplate");

DocumentFragment template_content = ((dynamic)template_el).content;

Would be nice to have a HTMLTemplateElement that exposes .content the same

way HTMLLinkElement exposes .import

What do you think?

1 Comment

Thanks for reporting, we already added to version 1.2:


public class HTMLTemplateElement : HTMLElement
  public extern DocumentFragment content { get; }


You should use it, this way:


var templateEl = document.getElementById<HTMLTemplateElement>("mytemplate");


Login or Signup to post a comment