pull/11592/head
Dominic Gannaway 2 years ago
parent d2879a969f
commit a659ef2335

@ -17,9 +17,6 @@ var text_prototype;
/** @type {typeof Node.prototype.appendChild} */
var append_child_method;
/** @type {typeof document.importNode} */
export var import_node;
/** @type {(this: Node) => ChildNode | null} */
var first_child_get;
@ -56,7 +53,6 @@ export function init_operations() {
text_prototype = Text.prototype;
append_child_method = node_prototype.appendChild;
import_node = document.importNode;
$window = window;
$document = document;
@ -106,6 +102,7 @@ export function init_operations() {
export function append_child(element, child) {
append_child_method.call(element, child);
}
/** @returns {Text} */
export function empty() {
return document.createTextNode('');

@ -1,5 +1,5 @@
import { hydrate_nodes, hydrating } from './hydration.js';
import { import_node, empty } from './operations.js';
import { empty } from './operations.js';
import { create_fragment_from_html } from './reconciler.js';
import { current_effect } from '../runtime.js';
import { TEMPLATE_FRAGMENT } from '../../../constants.js';
@ -54,7 +54,7 @@ export function template(content, flags) {
node = create_fragment_from_html(content);
if (!is_fragment) node = /** @type {Node} */ (node.firstChild);
}
var clone = import_node(node, true);
var clone = document.importNode(node, true);
push_template_node(
is_fragment
@ -121,7 +121,7 @@ export function svg_template(content, flags) {
}
}
var clone = import_node(node, true);
var clone = document.importNode(node, true);
push_template_node(
is_fragment
@ -188,7 +188,7 @@ export function mathml_template(content, flags) {
}
}
var clone = import_node(node, true);
var clone = document.importNode(node, true);
push_template_node(
is_fragment

@ -1,7 +1,7 @@
import "svelte/internal/disclose-version";
import * as $ from "svelte/internal/client";
var root = $.template(`<div></div> <svg></svg> <custom-element></custom-element> <div></div> <svg></svg> <custom-element></custom-element>`, 3);
var root = $.template(`<div></div> <svg></svg> <custom-element></custom-element> <div></div> <svg></svg> <custom-element></custom-element>`, 1);
export default function Main($$anchor) {
// needs to be a snapshot test because jsdom does auto-correct the attribute casing

Loading…
Cancel
Save