tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

events.js (830B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 "use strict";
      6 
      7 // This list is automatically generated by a python script at build time.
      8 const eventList = require("resource://devtools/server/actors/events/event-list.json");
      9 
     10 // Bug 1980978: Some events are missing from EventNameList.h
     11 // We may revise the implementation of event-list.json.
     12 eventList.push("DOMContentLoaded");
     13 
     14 /**
     15 * Reports if a given DOM Event name is probably supported by Gecko.
     16 * If it isn't, it is most likely a custom event implemented by the web page.
     17 *
     18 * @param {string} name
     19 * @return {boolean}
     20 */
     21 exports.isUserDefinedEventName = function (name) {
     22  return !eventList.includes(name);
     23 };