@litejs/dom 23.7.0 → 23.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -14
- package/index.js +3 -3
- package/package.json +4 -18
package/README.md
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
LiteJS DOM – [![Coverage][1]][2] [![Size][3]][4] [![Buy Me A Tea][5]][6]
|
|
11
11
|
==========
|
|
12
12
|
|
|
13
|
-
A small DOM library for server-side testing, rendering, and handling of HTML files.
|
|
13
|
+
A small DOM library for server-side testing, rendering, and handling of HTML files.
|
|
14
|
+
[DOM spec](https://dom.spec.whatwg.org/) |
|
|
15
|
+
[Selectors Level 3](http://www.w3.org/TR/selectors/)
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
Examples
|
|
@@ -61,28 +63,20 @@ el.querySelectorAll("b");
|
|
|
61
63
|
## Contributing
|
|
62
64
|
|
|
63
65
|
Follow [Coding Style Guide](https://github.com/litejs/litejs/wiki/Style-Guide)
|
|
64
|
-
|
|
65
|
-
Run tests
|
|
66
|
+
and run tests.
|
|
66
67
|
|
|
67
68
|
```
|
|
68
69
|
npm install
|
|
69
70
|
npm test
|
|
70
71
|
```
|
|
71
72
|
|
|
73
|
+
## Licence
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
Copyright (c) 2014-2023 Lauri Rooden <lauri@rooden.ee>
|
|
76
|
+
[MIT License](https://litejs.com/MIT-LICENSE.txt) |
|
|
75
77
|
[GitHub repo](https://github.com/litejs/dom) |
|
|
76
78
|
[npm package](https://npmjs.org/package/@litejs/dom) |
|
|
77
|
-
[
|
|
78
|
-
[Selectors Level 3](http://www.w3.org/TR/selectors/) |
|
|
79
|
-
[Coveralls coverage][2]
|
|
79
|
+
[coverage][2] |
|
|
80
80
|
[Buy Me A Tea][6]
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
## Licence
|
|
84
|
-
|
|
85
|
-
Copyright (c) 2014-2023 Lauri Rooden <lauri@rooden.ee>
|
|
86
|
-
[The MIT License](http://lauri.rooden.ee/mit-license.txt)
|
|
87
|
-
|
|
88
|
-
|
package/index.js
CHANGED
|
@@ -235,13 +235,13 @@ var boolAttrs = {
|
|
|
235
235
|
"§": "§", "²": "²", "³": "³", "¥": "¥"
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
Object.keys(boolAttrs).forEach(addGetter, { isBool: true })
|
|
238
|
+
Object.keys(boolAttrs).forEach(addGetter, { isBool: true, readonly: "readOnly" })
|
|
239
239
|
numAttrs.split(" ").forEach(addGetter, { isNum: true })
|
|
240
|
-
strAttrs.split(" ").forEach(addGetter, { })
|
|
240
|
+
strAttrs.split(" ").forEach(addGetter, { "for": "htmlFor", "class": "className" })
|
|
241
241
|
|
|
242
242
|
function addGetter(key) {
|
|
243
243
|
var attr = key.toLowerCase()
|
|
244
|
-
Object.defineProperty(Element, key
|
|
244
|
+
Object.defineProperty(Element, this[key] || key, {
|
|
245
245
|
configurable: true,
|
|
246
246
|
enumerable: true,
|
|
247
247
|
get: (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litejs/dom",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.8.0",
|
|
4
4
|
"description": "A small DOM library for server-side testing, rendering, and handling of HTML files",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lauri Rooden <lauri@rooden.ee>",
|
|
@@ -16,29 +16,15 @@
|
|
|
16
16
|
"*.js"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"test": "lj test --coverage --ignore=net.js --brief test/index.js && jshint *.js",
|
|
19
|
+
"test": "lj test --coverage --ignore=net.js --brief test/index.js && jshint --config .github/jshint.json *.js",
|
|
20
20
|
"test-fast": "lj test --brief test/index.js"
|
|
21
21
|
},
|
|
22
22
|
"repository": "github:litejs/dom",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@litejs/cli": "23.
|
|
24
|
+
"@litejs/cli": "23.8.0",
|
|
25
25
|
"jshint": "2.13.6"
|
|
26
26
|
},
|
|
27
27
|
"litejs": {
|
|
28
|
-
"build": false
|
|
29
|
-
"global": false
|
|
30
|
-
},
|
|
31
|
-
"jshintConfig": {
|
|
32
|
-
"esversion": 5,
|
|
33
|
-
"asi": true,
|
|
34
|
-
"evil": true,
|
|
35
|
-
"laxcomma": true,
|
|
36
|
-
"maxdepth": 6,
|
|
37
|
-
"node": true,
|
|
38
|
-
"nonbsp": true,
|
|
39
|
-
"undef": true,
|
|
40
|
-
"unused": true,
|
|
41
|
-
"shadow": "outer",
|
|
42
|
-
"quotmark": "double"
|
|
28
|
+
"build": false
|
|
43
29
|
}
|
|
44
30
|
}
|