base-element
Advanced tools
Comparing version 2.1.0 to 2.1.1
{ | ||
"name": "base-element", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "An element authoring library for creating standalone and performant elements.", | ||
@@ -28,7 +28,2 @@ "main": "index.js", | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"babelify" | ||
] | ||
}, | ||
"keywords": [ | ||
@@ -35,0 +30,0 @@ "virtual", |
@@ -23,3 +23,4 @@ # base-element | ||
## example usage | ||
Create a generic JavaScript "class" that inherits BaseElement: | ||
You can construct your element API however you choose. A way that I prefer is | ||
by inheriting prototypes: | ||
@@ -49,4 +50,3 @@ ```js | ||
### Prefer just functions? | ||
If you don't like "classes" the API supports an alternative interface with just | ||
functions: | ||
If you prefer just functions, an alternative interface is available: | ||
@@ -60,3 +60,3 @@ ```js | ||
// Render a button upon clicked will alert | ||
return this.html('button', { | ||
return el.html('button', { | ||
onclick: function (e) { | ||
@@ -116,3 +116,3 @@ window.alert(e.target.innerText + ' button was clicked') | ||
For example if I create an `input-box` element and published on npm: | ||
For example if you create an `input-box` element and published on npm: | ||
@@ -139,4 +139,4 @@ ```js | ||
Now yourself or another user can either consume your `input-box` or extend it | ||
to add their own functionality on top of yours, such as `email-input`: | ||
Later yourself or another user can extend `input-box` to add functionality on | ||
top, such as `email-input`: | ||
@@ -143,0 +143,0 @@ ```js |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
187325
5342