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

Event Failures #89

Open
him2him2 opened this issue Oct 31, 2017 · 0 comments
Open

Event Failures #89

him2him2 opened this issue Oct 31, 2017 · 0 comments

Comments

@him2him2
Copy link
Collaborator

him2him2 commented Oct 31, 2017

I created tests for the events listed in https://github.com/choojs/nanomorph/blob/master/lib/events.js#L32

They are tested in the as follows:

  1. test if the event is parsed from html
  2. test if events are removed in morph
  3. test of events are copied in morph

The following events fail to parse from HTML attribute. I believe this is a problem in Bel. But I am not sure where this problem originates.

The first two are listed as problematic and fail

Note: these event may not work as expected in Chrome, Safari and Opera 15+ using the JavaScript HTML DOM syntax. However, it should work as an HTML attribute and by using the addEventListener() method (See syntax examples below).

onfocusin
https://www.w3schools.com/jsref/event_onfocusin.asp

onfocusout
https://www.w3schools.com/jsref/event_onfocusout.asp

These events are listed as Editor's Draft(Non-stable version), but should work in chrome. They also fail.

ontouchcancel
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchcancel
https://developer.mozilla.org/en-US/docs/Web/Events/touchcancel

ontouchend
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchend
https://developer.mozilla.org/en-US/docs/Web/Events/touchend

ontouchmove
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchmove
https://developer.mozilla.org/en-US/docs/Web/Events/touchmove

ontouchstart
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchstart
https://developer.mozilla.org/en-US/docs/Web/Events/touchstart

This event should only work on the body tag, but also seems to fail.
onunload
https://www.w3schools.com/jsref/event_onunload.asp
Should only work on the body tag. Testing on the body tag fails.

I will submit a pull request that contains the event tests.

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

No branches or pull requests

1 participant