Sha256: 79116f85c7c43e8d2b48bb0cbaf61f30f04e1d2bcba9c83b4206c440038fa79f

Contents?: true

Size: 888 Bytes

Versions: 3

Compression:

Stored size: 888 Bytes

Contents

"use strict";

const conversions = require("webidl-conversions");
const utils = require("./utils.js");

const EventListenerOptions = require("./EventListenerOptions");

module.exports = {
  convertInherit(obj, ret) {
    EventListenerOptions.convertInherit(obj, ret);
    let key, value;

    key = "once";
    value = obj === undefined || obj === null ? undefined : obj[key];
    if (value !== undefined) {
      ret[key] = conversions["boolean"](value);
    } else {
      ret[key] = false;
    }
  },

  convert(obj) {
    if (obj !== undefined && typeof obj !== "object") {
      throw new TypeError("Dictionary has to be an object");
    }
    if (obj instanceof Date || obj instanceof RegExp) {
      throw new TypeError("Dictionary may not be a Date or RegExp object");
    }

    const ret = Object.create(null);
    module.exports.convertInherit(obj, ret);
    return ret;
  }
};

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
learn_create-0.0.22 lib/templates/javascript_lab_template/node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js
lanes-0.8.0 node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js
select_all-rails-0.3.1 node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js