Veams / query

Represents a very simple DOM API for Veams-JS (incl. ajax support)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

html() accepts string only

Sebastian-Fitzner opened this issue · comments

The html() method accepts a string only. But it would be better when it also accepts a DOM element as well. For now you have to use outerHTML which looks not so nice:

Current Implementation

const $clone = this.$el.clone(true);

this.$otherSelector.html($clone[0].outerHTML)

Improvement

const $clone = this.$el.clone(true);

this.$otherSelector.html($clone[0])

v2.3.0 adds support for VeamsQuery object and DOM node as parameter