mirror of https://github.com/sveltejs/svelte
parent
66d540d3c5
commit
d86251cdb9
@ -0,0 +1,3 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({});
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
// index.svelte (Svelte v5.0.0-next.13)
|
||||||
|
// Note: compiler output will change before 5.0 is released!
|
||||||
|
import "svelte/internal/disclose-version";
|
||||||
|
import * as $ from "svelte/internal";
|
||||||
|
|
||||||
|
export default function Svelte_element($$anchor, $$props) {
|
||||||
|
$.push($$props, true);
|
||||||
|
|
||||||
|
let tag = $.prop_source($$props, "tag", 'hr', false);
|
||||||
|
/* Init */
|
||||||
|
var fragment = $.comment($$anchor);
|
||||||
|
var node = $.child_frag(fragment);
|
||||||
|
|
||||||
|
$.element(node, () => $.get(tag));
|
||||||
|
$.close_frag($$anchor, fragment);
|
||||||
|
$.pop();
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
// index.svelte (Svelte v5.0.0-next.13)
|
||||||
|
// Note: compiler output will change before 5.0 is released!
|
||||||
|
import * as $ from "svelte/internal/server";
|
||||||
|
|
||||||
|
export default function Svelte_element($$payload, $$props) {
|
||||||
|
$.push(true);
|
||||||
|
|
||||||
|
let { tag = 'hr' } = $$props;
|
||||||
|
const anchor = $.create_anchor($$payload);
|
||||||
|
|
||||||
|
$$payload.out += `${anchor}`;
|
||||||
|
|
||||||
|
if (tag) {
|
||||||
|
const anchor_1 = $.create_anchor($$payload);
|
||||||
|
|
||||||
|
$$payload.out += `<${tag}>`;
|
||||||
|
|
||||||
|
if (!$.VoidElements.has(tag)) {
|
||||||
|
$$payload.out += `${anchor_1}`;
|
||||||
|
$$payload.out += `${anchor_1}</${tag}>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$$payload.out += `${anchor}`;
|
||||||
|
$.bind_props($$props, { tag });
|
||||||
|
$.pop();
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
let { tag = 'hr' } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:element this={tag} />
|
||||||
Loading…
Reference in new issue