Skip to content

Instantly share code, notes, and snippets.

Avatar

Marc Krisnanto marckris

View GitHub Profile
@marckris
marckris / b-icon.js
Last active Dec 31, 2019
Using SVG icons
View b-icon.js
customElements.define ("b-icon", class extends HTMLElement
{
static get observedAttributes ()
{
return ["name", "color", "size"]
}
_set_icon ()
{
let name = this.getAttribute ("name")