Permalink
Browse files

Add HTMLTemplateElement

This change adds support for the DOM API HTMLTemplateElement interface.

Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement.

GitHub-Pull-Request: #63
  • Loading branch information...
Inkeliz authored and dmitshur committed Dec 2, 2018
1 parent 6da835b commit 9dbdcd412bded130f0ffe92f67290626072b1e03
Showing with 8 additions and 0 deletions.
  1. +8 −0 dom.go
8 dom.go
@@ -390,6 +390,8 @@ func wrapHTMLElement(o *js.Object) HTMLElement {
return &HTMLTableRowElement{BasicHTMLElement: el}
case js.Global.Get("HTMLTableSectionElement"):
return &HTMLTableSectionElement{BasicHTMLElement: el}
case js.Global.Get("HTMLTemplateElement"):
return &HTMLTemplateElement{BasicHTMLElement: el}
case js.Global.Get("HTMLTextAreaElement"):
return &HTMLTextAreaElement{BasicHTMLElement: el}
case js.Global.Get("HTMLTimeElement"):
@@ -2936,6 +2938,12 @@ func (e *HTMLTableSectionElement) InsertRow(index int) *HTMLTableRowElement {
return wrapHTMLElement(e.Call("insertRow", index)).(*HTMLTableRowElement)
}
type HTMLTemplateElement struct{ *BasicHTMLElement }
func (e *HTMLTemplateElement) Content() DocumentFragment {
return wrapDocumentFragment(e.Get("content"))
}
type HTMLTextAreaElement struct {
*BasicHTMLElement
Autocomplete string `js:"autocomplete"`

0 comments on commit 9dbdcd4

Please sign in to comment.