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

Remove compiler warnings in todo example #997

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

jonathanKingston
Copy link
Contributor

  • Simplify usage of elements into element.rs
  • Fix a bug with focus not working on edit.

I'm currently ignoring Results from the DOM as for most cases I don't really think there is much recovery, perhaps they should behave like a panic?

let el_et: web_sys::EventTarget = el.into();
el_et.add_event_listener_with_callback(event_name, cb.as_ref().unchecked_ref());
let el_et: EventTarget = el.into();
let _r = el_et.add_event_listener_with_callback(event_name, cb.as_ref().unchecked_ref());
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't results like these be propagated out as an exception?

…into element.rs and fix a bug with focus not working on edit.
@jonathanKingston
Copy link
Contributor Author

@alexcrichton sorry for the delay here. I used console_error_panic_hook for the errors however I think it would be nicer to be exceptions though (perhaps that should be a feature flag for this crate?).

@alexcrichton
Copy link
Contributor

Ok no worries! We can always continue to iterate in-tree

@alexcrichton alexcrichton merged commit 4a70198 into rustwasm:master Nov 27, 2018
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.

2 participants