Sha256: 7605c0d8f0afa750c07ee88d568d2e3560cce8c68bec44b6b69ee4e736e38310

Contents?: true

Size: 797 Bytes

Versions: 2

Compression:

Stored size: 797 Bytes

Contents

"use strict";

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

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

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

    key = "state";
    value = obj === undefined || obj === null ? undefined : obj[key];
    if (value !== undefined) {
      ret[key] = (value);
    }
  },

  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

2 entries across 2 versions & 2 rubygems

Version Path
lanes-0.8.0 node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js
select_all-rails-0.3.1 node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js