add __svelte_meta to prototype

pull/11514/head
Rich Harris 2 years ago
parent 4a0e639732
commit e47d0b9cfe

@ -1,5 +1,6 @@
import { hydrate_anchor, hydrate_nodes, hydrating } from './hydration.js'; import { hydrate_anchor, hydrate_nodes, hydrating } from './hydration.js';
import { get_descriptor } from '../utils.js'; import { get_descriptor } from '../utils.js';
import { DEV } from 'esm-env';
// We cache the Node and Element prototype methods, so that we can avoid doing // We cache the Node and Element prototype methods, so that we can avoid doing
// expensive prototype chain lookups. // expensive prototype chain lookups.
@ -70,6 +71,11 @@ export function init_operations() {
// @ts-expect-error // @ts-expect-error
element_prototype.__attributes = null; element_prototype.__attributes = null;
if (DEV) {
// @ts-expect-error
element_prototype.__svelte_meta = null;
}
first_child_get = /** @type {(this: Node) => ChildNode | null} */ ( first_child_get = /** @type {(this: Node) => ChildNode | null} */ (
// @ts-ignore // @ts-ignore
get_descriptor(node_prototype, 'firstChild').get get_descriptor(node_prototype, 'firstChild').get

Loading…
Cancel
Save