kbrsh / moon

🌙 The minimal & fast library for functional user interfaces
https://moonjs.org
MIT License
5.99k stars 200 forks source link

use consistent event for moon browser XHR #259

Closed kbrsh closed 4 years ago

kbrsh commented 4 years ago

In the HTTP driver, the onload event is used rather than addEventListener. This PR refactors Moon Browser to use the same method by using onload along with an arrow function to clean up the event handling code that adds the listener.

codecov-io commented 4 years ago

Codecov Report

Merging #259 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #259   +/-   ##
=======================================
  Coverage   93.34%   93.34%           
=======================================
  Files          26       26           
  Lines         842      842           
  Branches      177      177           
=======================================
  Hits          786      786           
  Misses         49       49           
  Partials        7        7
Impacted Files Coverage Δ
packages/moon-browser/src/index.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 855db29...aab846f. Read the comment docs.