diff --git a/README.md b/README.md index 91bb636..79ec8ee 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,12 @@ The `` custom element supports the following attributes: - `shape`: one of the following values: `square`, `circle` - `animation`: One of the following values: `spin`, `tada`, `flashing`, `burst`, `fade-left`, `fade-right`, `spin-hover`, `tada-hover`, `flashing-hover`, `burst-hover`, `fade-left-hover`, `fade-right-hover` +The Custom Element class (`BoxIconElemnet`) exposes the following static members: +- `tagName`: property that holds the HTML element tag name. Default: `box-icon` +- `defined([tagName])`: Defines the Element in the custom element registry using either the tagName provided on input or the (default) the one defined on the Class. +- `cdnUrl`: property that holds the URL that will be used to retrieve the images. URL should point to the folder that contains the images. example: `//unpkg.com/boxicons@1.1.1/svg` (no trailing forward slash) +- `getIconSvg(iconName)`: method used to retrieve the SVG image. Should return a Promise that resolves with the SVG source (String). ## License diff --git a/src/box-icon-element.js b/src/box-icon-element.js index d474736..e127e46 100644 --- a/src/box-icon-element.js +++ b/src/box-icon-element.js @@ -74,7 +74,7 @@ export class BoxIconElement extends HTMLElement { static get cdnUrl() { // BUILD.DATA.VERSION is injected by webpack during a build. // Value is same as package.json#version property. - return `https://unpkg.com/boxicons@${BUILD.DATA.VERSION}/svg`; + return `//unpkg.com/boxicons@${BUILD.DATA.VERSION}/svg`; } /** * The html tag name to be use