Skip to content

Commit 001ef34

Browse files
committed
group statements by type
1 parent c735f2b commit 001ef34

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/svelte/src/internal/client/operations.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,23 @@ export function init_operations() {
6666
element_prototype = Element.prototype;
6767
text_prototype = Text.prototype;
6868
map_prototype = Map.prototype;
69+
6970
append_child_method = node_prototype.appendChild;
7071
clone_node_method = node_prototype.cloneNode;
7172
map_set_method = map_prototype.set;
7273
map_get_method = map_prototype.get;
7374
map_delete_method = map_prototype.delete;
74-
// @ts-expect-error improve perf of expando on DOM events
75+
76+
$window = window;
77+
$document = document;
78+
79+
// the following assignments improve perf of lookups on DOM nodes
80+
// @ts-expect-error
7581
element_prototype.__click = undefined;
76-
// @ts-expect-error improve perf of expando on DOM text updates
82+
// @ts-expect-error
7783
text_prototype.__nodeValue = ' ';
78-
// @ts-expect-error improve perf of expando on DOM className updates
84+
// @ts-expect-error
7985
element_prototype.__className = '';
80-
$window = window;
81-
$document = document;
8286

8387
first_child_get = /** @type {(this: Node) => ChildNode | null} */ (
8488
// @ts-ignore

0 commit comments

Comments
 (0)