Skip to content

Commit da0b462

Browse files
committed
Merge branch 'antonmak1-test-vanillajs-2'
2 parents 649e2c1 + 292fc8d commit da0b462

File tree

8 files changed

+307
-16
lines changed

8 files changed

+307
-16
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**Please note: There's an [issue](https://github.com/krausest/js-framework-benchmark/issues/1655) with chrome 124 such that we don't get reliable values. Currently all PRs are blocked by this issue.**
2+
13

24
# js-framework-benchmark
35

frameworks/keyed/cample/package-lock.json

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

frameworks/keyed/cample/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-cample",
3-
"version": "3.2.0-alpha.44",
3+
"version": "3.2.0-alpha.45",
44
"description": "cample demo",
55
"main": "dist/main.js",
66
"js-framework-benchmark": {
@@ -30,6 +30,6 @@
3030
"webpack-cli": "5.1.4"
3131
},
3232
"dependencies": {
33-
"cample": "3.2.0-alpha.44"
33+
"cample": "3.2.0-alpha.45"
3434
}
3535
}

frameworks/keyed/cample/src/main.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ const eachComponent = each(
8282
({ importedData }) => importedData.rows,
8383
`<tr key="{{row.id}}" class="{{[selected]}}">
8484
<td class='col-md-1'>{{row.id}}</td>
85-
<td class='col-md-4'><a :click="{{importedData.setSelected(row.id)}}" class='lbl'>{{row.label}}</a></td>
86-
<td class='col-md-1'><a :click="{{importedData.delete(row.id)}}" class='remove'><span class='remove glyphicon glyphicon-remove' aria-hidden='true'></span></a></td>
85+
<td class='col-md-4'><a ::click="{{importedData.setSelected(row.id)}}" class='lbl'>{{row.label}}</a></td>
86+
<td class='col-md-1'><a ::click="{{importedData.delete(row.id)}}" class='remove'><span class='remove glyphicon glyphicon-remove' aria-hidden='true'></span></a></td>
8787
<td class='col-md-6'></td>
8888
</tr>`,
8989
{
@@ -151,28 +151,28 @@ const mainComponent = component(
151151
functions: {
152152
run: [
153153
(setData, event) => () => {
154-
event.preventDefault();
154+
event.stopPropagation();
155155
setData(() => buildData(1000));
156156
},
157157
"updateRows",
158158
],
159159
runLots: [
160160
(setData, event) => () => {
161-
event.preventDefault();
161+
event.stopPropagation();
162162
setData(() => buildData(10000));
163163
},
164164
"updateRows",
165165
],
166166
add: [
167167
(setData, event) => () => {
168-
event.preventDefault();
168+
event.stopPropagation();
169169
setData((d) => [...d, ...buildData(1000)]);
170170
},
171171
"updateRows",
172172
],
173173
update: [
174174
(setData, event) => () => {
175-
event.preventDefault();
175+
event.stopPropagation();
176176
setData((d) => {
177177
const value = d.slice();
178178
for (let i = 0; i < value.length; i += 10) {
@@ -186,14 +186,14 @@ const mainComponent = component(
186186
],
187187
clear: [
188188
(setData, event) => () => {
189-
event.preventDefault();
189+
event.stopPropagation();
190190
setData(() => []);
191191
},
192192
"updateRows",
193193
],
194194
swapRows: [
195195
(setData, event) => () => {
196-
event.preventDefault();
196+
event.stopPropagation();
197197
setData((d) => {
198198
const tmp = d[1];
199199
d[1] = d[998];
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8"/>
5+
<title>VanillaJS-"keyed"</title>
6+
<link href="/css/currentStyle.css" rel="stylesheet"/>
7+
</head>
8+
<body>
9+
<div id='main'>
10+
<div class="container">
11+
<div class="jumbotron">
12+
<div class="row">
13+
<div class="col-md-6">
14+
<h1>VanillaJS-"keyed"</h1>
15+
</div>
16+
<div class="col-md-6">
17+
<div class="row">
18+
<div class="col-sm-6 smallpad">
19+
<button type='button' class='btn btn-primary btn-block' id='run'>Create 1,000 rows</button>
20+
</div>
21+
<div class="col-sm-6 smallpad">
22+
<button type='button' class='btn btn-primary btn-block' id='runlots'>Create 10,000 rows</button>
23+
</div>
24+
<div class="col-sm-6 smallpad">
25+
<button type='button' class='btn btn-primary btn-block' id='add'>Append 1,000 rows</button>
26+
</div>
27+
<div class="col-sm-6 smallpad">
28+
<button type='button' class='btn btn-primary btn-block' id='update'>Update every 10th row</button>
29+
</div>
30+
<div class="col-sm-6 smallpad">
31+
<button type='button' class='btn btn-primary btn-block' id='clear'>Clear</button>
32+
</div>
33+
<div class="col-sm-6 smallpad">
34+
<button type='button' class='btn btn-primary btn-block' id='swaprows'>Swap Rows</button>
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
<table class="table table-hover table-striped test-data">
41+
<tbody id="tbody"></tbody>
42+
</table>
43+
<span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span>
44+
</div>
45+
</div>
46+
<script src='src/Main.js'></script>
47+
</body>
48+
</html>

frameworks/keyed/vanillajs-2/package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "js-framework-benchmark-vanillajs-2",
3+
"version": "1.1.1",
4+
"description": "Vanilla.JS demo",
5+
"main": "index.js",
6+
"js-framework-benchmark": {
7+
"frameworkVersion": "",
8+
"frameworkHomeURL": "",
9+
"issues": [772]
10+
},
11+
"scripts": {
12+
"dev": "exit 0",
13+
"build-prod": "exit 0"
14+
},
15+
"keywords": [],
16+
"author": "Stefan Krause",
17+
"license": "Apache-2.0",
18+
"homepage": "https://github.com/krausest/js-framework-benchmark",
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/krausest/js-framework-benchmark.git"
22+
}
23+
}

0 commit comments

Comments
 (0)