A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/@webref/events below:

@webref/events - npm

Events of the Web platform and associated Web IDL interfaces

This package contains a consolidated list of events defined across specs, scraped from the latest versions of web platform specifications in webref, along with the name of the Web IDL interfaces that these events use and target. Fixes are applied to ensure that guarantees hold.

The async listAll() method resolves with a list of events. Example:

const events = require('@webref/events');

events.listAll().then(all => {
  for (const event of all) {
    // do something with the json object that describes the event
  }
});

Each event is described by an object with the following properties:

The following example illustrates access to main properties:

const events = require('@webref/events');

events.listAll().then(all => {
  for (const event of all) {
    console.log();
    console.log(`Event type=${event.type}
      interface=${event.interface}
      targets=${event.targets
        .map(t => t.target +
          (t.bubbles === undefined ? '' : ` (bubbles: ${t.bubbles})`))
        .join(', ')}`);
  }
});

Actual interfaces on which an event will bubble may be interfaces that inherit from the interfaces listed in bubblingPath. For instance, for a bubbling event that fires on HTMLSelectElement, the bubbling path will be ["Node", "Document", "Window"], even though the event will only bubble on HTMLElement and not on all types of Node in practice.

The following guarantees are provided by this package:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4