Git Product home page Git Product logo

Comments (3)

JuneAndGreen avatar JuneAndGreen commented on September 28, 2024

Event 设计成这样是有一些历史遗留原因,有什么特殊场景是必须使用 Event 构造器的么?

如果是一般的自定义事件可以走 CustomEvent,这个第一个参数就是 typeArg,第二个参数就是 eventInit

from kbone.

yifan0817 avatar yifan0817 commented on September 28, 2024

哦哦,了解了,就是发现和标准参数不一致还以为是自己写错了。我这边业务中有一些直接用的 Event,没用 CustomEvent,参数会报错。现在是通过劫持了一下 Event 来兼容这种参数,放在 globalVars 里解决掉了

from kbone.

JuneAndGreen avatar JuneAndGreen commented on September 28, 2024

好的,我在代码上也补充了一下注释说明

from kbone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.