wasmerio / winterjs

Winter is coming... ❄️
https://winterjs.org/
MIT License
3.05k stars 53 forks source link

Add Event and minimal EventTarget #76

Closed MasatoDev closed 7 months ago

MasatoDev commented 7 months ago

Overview

Thank you for your confirmation. I implemented Event and EventTarget that are related to https://github.com/wasmerio/winterjs/issues/9 without detailed dispatching logic.

Description

This PR is regarded to bellow spec.

https://dom.spec.whatwg.org/#event https://dom.spec.whatwg.org/#eventtarget

I referred to the following code.

https://github.com/denoland/deno/blob/main/ext/web/02_event.js

Scope

out-of-scop items

Outstanding issue

Test

スクリーンショット 2024-04-25 15 59 58

syrusakbary commented 7 months ago

Waiting on feedback from @Arshia001 on this one

Arshia001 commented 7 months ago

Hey @MasatoDev, thank you for your contribution!

Currently, it is impossible to define global objects in JS/TS. However, I think it would be beneficial to add that in, so I'll create an issue for it and move this to the global scope once that's implemented.