Code Monkey home page Code Monkey logo

fusion-components's People

Contributors

dependabot[bot] avatar iahu avatar

Watchers

 avatar

fusion-components's Issues

Web Component 内部没有原生方法检测事件是否被用户设置过 `preventDefault()`

当用户在监听 fc-buttononClick 事件时,调用过 preventDefault() 理应取消默认行为。

但是,内部无法正常监听到 defaultPrevented,因为内部事件绑定在前,用户事件绑定在后,而只有调用 preventDefault() 之后的事件绑定函数能正常拿到 defaultPrevented: true 属性。

目前的方法是使用了一个 setTimeout 来延迟内部事件绑定函数的执行时机,以期拿到被用户设置过的 defaultPrevented。此方法绝大部分情况下可行。

whatwg/html#2311

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.