hyperscript
Advanced tools
Comparing version 1.4.0 to 1.4.2
var split = require('browser-split') | ||
var ClassList = require('class-list') | ||
var DataSet = require('data-set') | ||
require('html-element') | ||
@@ -90,3 +89,3 @@ | ||
} else if (k.substr(0, 5) === "data-") { | ||
DataSet(e)[k.substr(5)] = l[k] | ||
e.setAttribute(k, l[k]) | ||
} else { | ||
@@ -93,0 +92,0 @@ e[k] = l[k] |
{ | ||
"name": "hyperscript", | ||
"version": "1.4.0", | ||
"version": "1.4.2", | ||
"homepage": "https://github.com/dominictarr/hyperscript", | ||
@@ -12,4 +12,3 @@ "repository": { | ||
"devDependencies": { | ||
"html-element": "~1.1.0", | ||
"tape": "~0.2.2", | ||
"tape": "~2.13.3", | ||
"observable": "~2.1.2", | ||
@@ -22,5 +21,3 @@ "ispy": "~0.1.2", | ||
"browser-split": "0.0.0", | ||
"data-set": "~0.2.2", | ||
"html-element": "~1.2.8", | ||
"tape": "~2.3.0" | ||
"html-element": "~1.3.0" | ||
}, | ||
@@ -27,0 +24,0 @@ "browser": { |
@@ -10,2 +10,5 @@ # HyperScript | ||
See also [mercury](https://github.com/Raynos/mercury) is a modular ui | ||
framework influenced by hyperscript but much more heavily optimized. | ||
## Example | ||
@@ -59,3 +62,3 @@ | ||
If an `{}` object is passed in, it's values will be used to set attributes. | ||
If an `{}` object is passed in it will be used to set attributes. | ||
@@ -67,2 +70,10 @@ ``` js | ||
Note that hyperscript sets properties on the DOM element object, not | ||
attributes on the HTML element. This makes for better consistency across | ||
browsers and a nicer API for booleans. There are some gotchas, however. | ||
Attributes such as `colspan` are camel cased to `colSpan`, and `for` on the | ||
label element is `htmlFor` to avoid collision with the language keyword. See the | ||
[DOM HTML specification](http://www.w3.org/TR/DOM-Level-2-HTML/html.html) | ||
for details. | ||
### events | ||
@@ -69,0 +80,0 @@ |
@@ -137,3 +137,3 @@ | ||
var p = _h('p', {style: {color: color}, className: className}, text) | ||
t.equal(p.outerHTML, '<p class=\"para\" style=\"color: red;\">hello</p>') | ||
t.equal(p.outerHTML, '<p style=\"color: red; \" class=\"para\">hello</p>') | ||
_h.cleanup() | ||
@@ -143,3 +143,3 @@ color('blue') | ||
className('section') | ||
t.equal(p.outerHTML, '<p class=\"para\" style=\"color: red;\">hello</p>') | ||
t.equal(p.outerHTML, '<p style=\"color: red; \" class=\"para\">hello</p>') | ||
t.end() | ||
@@ -146,0 +146,0 @@ }) |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
46166
3
4
171
0
262
+ Addedhtml-element@1.3.0(transitive)
- Removeddata-set@~0.2.2
- Removedtape@~2.3.0
- Removeddata-set@0.2.2(transitive)
- Removeddeep-equal@0.1.2(transitive)
- Removeddefined@0.0.0(transitive)
- Removedglobal@0.1.5(transitive)
- Removedhtml-element@1.2.8(transitive)
- Removedindividual@0.1.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjsonify@0.0.1(transitive)
- Removedresumer@0.0.0(transitive)
- Removedtape@2.3.3(transitive)
- Removedthrough@2.3.8(transitive)
- Removedweakmap@0.0.6(transitive)
Updatedhtml-element@~1.3.0