choojs / choojs/nanohtml

Event Failures

Open
#99 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
688
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Related: #https://github.com/choojs/nanomorph/issues/89

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

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.
- onfocusin
- onfocusout
- ontouchcancel
- ontouchend
- ontouchmove
- ontouchstart
- onunload

**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.

**Note: Failing tests have been commented out.**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.