Skip to content

Commit

Permalink
feat(#80): add support for self and trusted event modificators
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprey committed Dec 14, 2021
1 parent c9f72ae commit 1a9104b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div>
<!-- Event fired when user clicked on button. -->
<button on:click|once|preventDefault>
<button on:click|once|preventDefault|stopPropagation|passive|nonpassive|capture|self|trusted>
Click to fire
</button>
</div>
2 changes: 1 addition & 1 deletion test/svelte3/integration/events/events.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('SvelteDoc v3 - Events', () => {
expect(event.description).to.equal('Event fired when user clicked on button.');

expect(event.modificators).to.eql([
'once', 'preventDefault'
'once', 'preventDefault', 'stopPropagation', 'passive', 'nonpassive', 'capture', 'self', 'trusted'
]);

done();
Expand Down
4 changes: 3 additions & 1 deletion typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ export type SvelteEventModificator =
| 'passive'
| 'capture'
| 'once'
| 'nonpassive';
| 'nonpassive'
| 'self'
| 'trusted';

export interface SvelteEventItem extends ISvelteItem {
/**
Expand Down

0 comments on commit 1a9104b

Please sign in to comment.