File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,23 @@ export function init_operations() {
66
66
element_prototype = Element . prototype ;
67
67
text_prototype = Text . prototype ;
68
68
map_prototype = Map . prototype ;
69
+
69
70
append_child_method = node_prototype . appendChild ;
70
71
clone_node_method = node_prototype . cloneNode ;
71
72
map_set_method = map_prototype . set ;
72
73
map_get_method = map_prototype . get ;
73
74
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
75
81
element_prototype . __click = undefined ;
76
- // @ts -expect-error improve perf of expando on DOM text updates
82
+ // @ts -expect-error
77
83
text_prototype . __nodeValue = ' ' ;
78
- // @ts -expect-error improve perf of expando on DOM className updates
84
+ // @ts -expect-error
79
85
element_prototype . __className = '' ;
80
- $window = window ;
81
- $document = document ;
82
86
83
87
first_child_get = /** @type {(this: Node) => ChildNode | null } */ (
84
88
// @ts -ignore
You can’t perform that action at this time.
0 commit comments