Coder Social home page Coder Social logo

Comments (1)

aviflombaum avatar aviflombaum commented on May 17, 2024

I found it helpful to think of events in terms of the browser exposing an API to the programmer that you hook into through Javascript. Whenever you click on an element, the browser is going to check to see if any code is bound to the click of event of that object. That is to say, the browser will call the any click events bound to that object - just like in normal OO hooks, sort of. So yes, events are just properties of the Document Objects.

You can attach as many event callbacks to the DOM. There is a manner to what order those events get triggered, known as the event model or event bubbling or other things.

You can look at an object's properties, including it's bound functions through a DOM Inspector like Chrome's Inspect or Firebug.

You can create custom events easily through the jQuery framework. There is a rich API for this.

Event propagation is how events get bound and trigger.

Javascript the Good Parts. Secrets of a Javascript Ninja. jQuery in Action, there are lots of good books. Hope that little comment helps - I'll try to find time to fork this and expand on your questions.

from js-the-right-way.

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.