Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added missing event handlers #388

Merged
merged 2 commits into from
Jul 31, 2020

Conversation

bfanger
Copy link
Contributor

@bfanger bfanger commented Jul 30, 2020

Event handlers that are working, like <svelte:window on:hashchange={handler} /> are triggering typescript errors:

is not assignable to type 'HTMLProps<Window> & SvelteWindowProps'.

I've extracted the available events from Chrome with: JSON.stringify(Object.keys(window).filter(k=>k.substr(0,2) ==='on')) and removed events that didn't have a type like Window['onsearch']or are deprecated/non-standard like onmousewheel

@bfanger bfanger force-pushed the feature/event-handlers branch 2 times, most recently from 1d4a360 to 25d248c Compare July 30, 2020 15:43
Copy link
Member

@jasonlyu123 jasonlyu123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Great jobs! But there something I think can be improved.

packages/svelte2tsx/svelte-jsx.d.ts Outdated Show resolved Hide resolved
packages/svelte2tsx/svelte-jsx.d.ts Outdated Show resolved Hide resolved
@bfanger
Copy link
Contributor Author

bfanger commented Jul 31, 2020

Hmm, my editor formatted causing conficts, i'll clean up the commits, one moment..

- Removed *capture
- Synced knownevents.ts
@bfanger
Copy link
Contributor Author

bfanger commented Jul 31, 2020

Done, removed (and tested) the unnecessary on*capture event handlers, also synced the knownevents.ts and added onfullscreenchange & onfullscreenerror (I checked all events on div element)

@bfanger bfanger requested a review from jasonlyu123 July 31, 2020 09:15
Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really fantastic work, thanks! Just one minor thing I noticed.

packages/svelte2tsx/svelte-jsx.d.ts Outdated Show resolved Hide resolved
Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@jasonlyu123 jasonlyu123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great jobs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants