Pass options in component event

pull/3005/head
Timothy Johnson 6 years ago
parent 9223f56323
commit cdd3bf0165

@ -508,7 +508,7 @@ export default function dom(
super(${options.dev && `options`});
${should_add_css && `if (!@_document.getElementById("${component.stylesheet.id}-style")) ${add_css}();`}
@init(this, options, ${definition}, create_fragment, ${not_equal}, ${prop_names});
${options.dev && `@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${name}", id: create_fragment.name });`}
${options.dev && `@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${name}", options, id: create_fragment.name });`}
${dev_props_check}
}

@ -88,7 +88,7 @@ class Component extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["name"]);
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", id: create_fragment.name });
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", options, id: create_fragment.name });
const { ctx } = this.$$;
const props = options.props || {};

@ -182,7 +182,7 @@ class Component extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["things", "foo", "bar", "baz"]);
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", id: create_fragment.name });
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", options, id: create_fragment.name });
const { ctx } = this.$$;
const props = options.props || {};

@ -178,7 +178,7 @@ class Component extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["things", "foo"]);
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", id: create_fragment.name });
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", options, id: create_fragment.name });
const { ctx } = this.$$;
const props = options.props || {};

@ -58,7 +58,7 @@ class Component extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance, create_fragment, safe_not_equal, []);
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", id: create_fragment.name });
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", options, id: create_fragment.name });
}
}

@ -93,7 +93,7 @@ class Component extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", id: create_fragment.name });
dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Component", options, id: create_fragment.name });
const { ctx } = this.$$;
const props = options.props || {};

Loading…
Cancel
Save