Giter VIP home page Giter VIP logo

Comments (3)

captainbrosset avatar captainbrosset commented on June 11, 2024

After a second look, except if we change the way the eventlistener popup works, we can't achieve the same here.
Indeed, NodeActors send a hasEventListeners boolean flag as part of their form. form() is a sync method, so when it runs, we cannot call DOM.getEventListenersForNode to check whether the node has event listeners, cause this call is async.

So either we change the event listener popup mechanism by making the markup-view call a new hasEventListeners method on the actor when it imports it, or we do that call in the walker, when referencing a new node.

from valence.

captainbrosset avatar captainbrosset commented on June 11, 2024

@MikeRatcliffe what do you think we could do here?

from valence.

MikeRatcliffe avatar MikeRatcliffe commented on June 11, 2024

Well, we plan on moving the event checks into it's own actor as the code is duplicated between the debugger and inspector at the moment.

hasEventListeners has very little cost so we can do that wherever but getEventListeners needs the debugger to be initialized so that is very costly.

We could have hasEventListeners in the walker, that would make sense but I am not sure about the performance hit.

Because we need to move the events stuff into it's own actor maybe a new hasEventListeners method on that actor makes the most sense.

from valence.

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.