UNPKG

edo-htqw

Version:

A easier HTML element's dom operation libary.

21 lines (20 loc) 548 B
export default function (edo) { edo.proto("text", function (val) { if (val === undefined) { return this.el.innerText; } return this.el.innerText = val; }); edo.proto("html", function (val) { if (val === undefined) { return this.el.innerHTML; } return this.el.innerHTML = val; }); edo.proto("href", function (val) { if (val === undefined) { return this.el.href; } return this.el.href = val; }); }