@webcomponents/webcomponents-platform
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@webcomponents/webcomponents-platform", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Basic platform polyfills needed by webcomponents.js", | ||
@@ -19,7 +19,13 @@ "main": "webcomponents-platform.js", | ||
"scripts": { | ||
"test": "wct" | ||
"build": "gulp", | ||
"test": "wct", | ||
"prepack": "npm run build" | ||
}, | ||
"homepage": "http://webcomponents.org", | ||
"devDependencies": { | ||
"web-component-tester": "^5.0.0" | ||
"google-closure-compiler": "^20180910.0.0", | ||
"gulp": "^4.0.0", | ||
"gulp-sourcemaps": "^2.6.4", | ||
"wct-browser-legacy": "^1.0.0", | ||
"web-component-tester": "^6.8.0" | ||
}, | ||
@@ -26,0 +32,0 @@ "publishConfig": { |
@@ -5,3 +5,4 @@ { | ||
"environmentImports": [] | ||
} | ||
}, | ||
"npm": true | ||
} |
@@ -11,3 +11,3 @@ /** | ||
(function(scope) { | ||
(function() { | ||
@@ -45,16 +45,9 @@ 'use strict'; | ||
// CustomEvent constructor shim | ||
if (!window.CustomEvent || isIE && (typeof window.CustomEvent !== 'function')) { | ||
window.CustomEvent = function(inType, params) { | ||
params = params || {}; | ||
var e = document.createEvent('CustomEvent'); | ||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); | ||
return e; | ||
}; | ||
window.CustomEvent.prototype = window.Event.prototype; | ||
} | ||
// Event constructor shim | ||
if (!window.Event || isIE && (typeof window.Event !== 'function')) { | ||
var origEvent = window.Event; | ||
/** | ||
* @param {!string} inType | ||
* @param {?(EventInit)=} params | ||
*/ | ||
window.Event = function(inType, params) { | ||
@@ -70,8 +63,29 @@ params = params || {}; | ||
} | ||
window.Event.prototype = origEvent.prototype; | ||
} | ||
window.Event.prototype = origEvent.prototype; | ||
} | ||
// CustomEvent constructor shim | ||
if (!window.CustomEvent || isIE && (typeof window.CustomEvent !== 'function')) { | ||
/** | ||
* @template T | ||
* @param {!string} inType | ||
* @param {?(CustomEventInit<T>)=} params | ||
*/ | ||
window.CustomEvent = function(inType, params) { | ||
params = params || {}; | ||
var e = /** @type {!CustomEvent} */ (document.createEvent('CustomEvent')); | ||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); | ||
return e; | ||
}; | ||
window.CustomEvent.prototype = window.Event.prototype; | ||
} | ||
if (!window.MouseEvent || isIE && (typeof window.MouseEvent !== 'function')) { | ||
var origMouseEvent = window.MouseEvent; | ||
/** | ||
* | ||
* @param {!string} inType | ||
* @param {?(MouseEventInit)=} params | ||
*/ | ||
window.MouseEvent = function(inType, params) { | ||
@@ -99,3 +113,3 @@ params = params || {}; | ||
Array.from = function (object) { | ||
return [].slice.call(object); | ||
return [].slice.call(/** @type {IArrayLike} */(object)); | ||
}; | ||
@@ -125,2 +139,2 @@ } | ||
})(window.WebComponents); | ||
})(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
23462
179
0
5