Skip to content

Commit 50fcb25

Browse files
author
Henrik jJaven
committed
DooHTML-v0.91.7-beta
1 parent 9a403c0 commit 50fcb25

File tree

6 files changed

+28
-25
lines changed

6 files changed

+28
-25
lines changed

frameworks/keyed/doohtml-dom/js/Main.class.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const nouns = ["table", "chair", "house", "bbq", "desk", "car", "pony", "cookie"
77

88
const lenA = adjectives.length, lenB = colours.length, lenC = nouns.length
99
const DEFAULT_SIZE = 1000
10-
const SWAP_ROW = 998
11-
const EMPTY = String('')
10+
const CHILD_1 = 1
11+
const CHILD_998 = 998
1212
Doo.define(
1313
class Main extends Doo {
1414
constructor() {
@@ -126,16 +126,16 @@ Doo.define(
126126
}
127127

128128
swapRows() {
129-
if (this.data.rows.length > SWAP_ROW) {
130-
let node1 = this.tbody.firstChild.nextSibling,
131-
swapRow = this.tbody.childNodes[SWAP_ROW],
129+
if (this.data.rows.length > CHILD_998) {
130+
let node1 = this.tbody.childNodes[CHILD_1],
131+
swapRow = this.tbody.childNodes[CHILD_998],
132132
node999 = swapRow.nextSibling,
133-
row1 = this.data.rows[1]
133+
row1 = this.data.rows[CHILD_1]
134134

135-
this.data.rows[1] = this.data.rows[SWAP_ROW];
136-
this.data.rows[SWAP_ROW] = row1
137-
138-
this.tbody.insertBefore(node1.parentNode.replaceChild(swapRow, node1), node999)
135+
this.data.rows[CHILD_1] = this.data.rows[CHILD_998];
136+
this.data.rows[CHILD_998] = row1
137+
this.tbody.insertBefore(swapRow, node1)
138+
this.tbody.insertBefore(node1, node999)
139139
}
140140
}
141141

frameworks/keyed/doohtml-dom/js/doo.html.min.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/doohtml-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-doohtml",
3-
"version": "0.91.5-beta",
3+
"version": "0.91.7-beta",
44
"description": "DooHTML-DOM (no shadow) JS-Benchmark",
55
"main": "Main.class.js",
66
"js-framework-benchmark": {

frameworks/keyed/doohtml/js/Main.class.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const nouns = ["table", "chair", "house", "bbq", "desk", "car", "pony", "cookie"
99
const lenA = adjectives.length, lenB = colours.length, lenC = nouns.length
1010

1111
const DEFAULT_SIZE = 1000
12-
const SWAP_ROW = 998
12+
const CHILD_1 = 1
13+
const CHILD_998 = 998
14+
1315
Doo.define(
1416
class Main extends Doo {
1517
constructor() {
@@ -127,16 +129,16 @@ Doo.define(
127129
}
128130

129131
swapRows() {
130-
if (this.data.rows.length > SWAP_ROW) {
131-
let node1 = this.tbody.firstChild.nextSibling,
132-
swapRow = this.tbody.childNodes[SWAP_ROW],
132+
if (this.data.rows.length > CHILD_998) {
133+
let node1 = this.tbody.childNodes[CHILD_1],
134+
swapRow = this.tbody.childNodes[CHILD_998],
133135
node999 = swapRow.nextSibling,
134-
row1 = this.data.rows[1]
135-
136-
this.data.rows[1] = this.data.rows[SWAP_ROW];
137-
this.data.rows[SWAP_ROW] = row1
136+
row1 = this.data.rows[CHILD_1]
138137

139-
this.tbody.insertBefore(node1.parentNode.replaceChild(swapRow, node1), node999)
138+
this.data.rows[CHILD_1] = this.data.rows[CHILD_998];
139+
this.data.rows[CHILD_998] = row1
140+
this.tbody.insertBefore(swapRow, node1)
141+
this.tbody.insertBefore(node1, node999)
140142
}
141143
}
142144

frameworks/keyed/doohtml/js/doo.html.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/doohtml/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-doohtml",
3-
"version": "0.91.4-beta",
3+
"version": "0.91.7-beta",
44
"description": "DooHTML JS-Benchmark",
55
"main": "Main.class.js",
66
"js-framework-benchmark": {

0 commit comments

Comments
 (0)