Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix) keep colon while transforming events (#1549)
on:click -> "on:click" instead of on:click -> "onclick"
- Loading branch information
1 parent
eb2e8cd
commit cdd046a
Showing
28 changed files
with
376 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/svelte2tsx/test/htmlx2jsx/samples/directive-quoted/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/svelte2tsx/test/htmlx2jsx/samples/editing-event-handler/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ svelteHTML.createElement("div", { "onclick":handlers.,}); } | ||
{ svelteHTML.createElement("div", { "on:click":handlers.,}); } | ||
|
||
{ const $$_Component0C = __sveltets_2_ensureComponent(Component); const $$_Component0 = new $$_Component0C({ target: __sveltets_2_any(), props: { }});$$_Component0.$on("click", handlers.);} |
2 changes: 1 addition & 1 deletion
2
packages/svelte2tsx/test/htmlx2jsx/samples/event-handler-bare/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ svelteHTML.createElement("h1", { "onclick":undefined,}); } | ||
{ svelteHTML.createElement("h1", { "on:click":undefined,}); } |
2 changes: 1 addition & 1 deletion
2
packages/svelte2tsx/test/htmlx2jsx/samples/event-handler-customname/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ svelteHTML.createElement("h1", { "onclick-outside":undefined,"onclick-outside2":() => 'hi',}); } | ||
{ svelteHTML.createElement("h1", { "on:click-outside":undefined,"on:click-outside2":() => 'hi',}); } |
2 changes: 1 addition & 1 deletion
2
packages/svelte2tsx/test/htmlx2jsx/samples/event-handler-modifiers/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ svelteHTML.createElement("h1", { "onclick":click,}); } | ||
{ svelteHTML.createElement("h1", { "on:click":click,}); } |
4 changes: 2 additions & 2 deletions
4
packages/svelte2tsx/test/htmlx2jsx/samples/event-handler-quoted/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{ svelteHTML.createElement("button", { "onclick":(e) => {},}); } | ||
{ svelteHTML.createElement("button", { "onclick":(e) => {},}); } | ||
{ svelteHTML.createElement("button", { "on:click":(e) => {},}); } | ||
{ svelteHTML.createElement("button", { "on:click":(e) => {},}); } |
2 changes: 1 addition & 1 deletion
2
packages/svelte2tsx/test/htmlx2jsx/samples/event-handler/expectedv2.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.