mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.7 KiB
66 lines
1.7 KiB
/* generated by Svelte vX.Y.Z */
|
|
import { addLoc, append, assign, createElement, createText, detachNode, init, insert, protoDev, setData } from "svelte/shared.js";
|
|
|
|
const file = undefined;
|
|
|
|
function create_main_fragment(component, ctx) {
|
|
var h1, text0, text1, text2, text3;
|
|
|
|
return {
|
|
c: function create() {
|
|
h1 = createElement("h1");
|
|
text0 = createText("Hello ");
|
|
text1 = createText(ctx.name);
|
|
text2 = createText("!");
|
|
text3 = createText("\n");
|
|
debugger;
|
|
addLoc(h1, file, 0, 0, 0);
|
|
},
|
|
|
|
m: function mount(target, anchor) {
|
|
insert(target, h1, anchor);
|
|
append(h1, text0);
|
|
append(h1, text1);
|
|
append(h1, text2);
|
|
insert(target, text3, anchor);
|
|
},
|
|
|
|
p: function update(changed, ctx) {
|
|
if (changed.name) {
|
|
setData(text1, ctx.name);
|
|
}
|
|
|
|
debugger;
|
|
},
|
|
|
|
d: function destroy(detach) {
|
|
if (detach) {
|
|
detachNode(h1);
|
|
detachNode(text3);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
function SvelteComponent(options) {
|
|
this._debugName = '<SvelteComponent>';
|
|
if (!options || (!options.target && !options.root)) throw new Error("'target' is a required option");
|
|
init(this, options);
|
|
this._state = assign({}, options.data);
|
|
if (!('name' in this._state)) console.warn("<SvelteComponent> was created without expected data property 'name'");
|
|
this._intro = true;
|
|
|
|
this._fragment = create_main_fragment(this, this._state);
|
|
|
|
if (options.target) {
|
|
if (options.hydrate) throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
this._fragment.c();
|
|
this._mount(options.target, options.anchor);
|
|
}
|
|
}
|
|
|
|
assign(SvelteComponent.prototype, protoDev);
|
|
|
|
SvelteComponent.prototype._checkReadOnly = function _checkReadOnly(newState) {
|
|
};
|
|
export default SvelteComponent; |