Socket
Socket
Sign inDemoInstall

@material/dom

Package Overview
Dependencies
Maintainers
13
Versions
1652
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/dom - npm Package Compare versions

Comparing version 0.41.0 to 1.0.0-0

dist/mdc.dom.d.ts

68

dist/mdc.dom.js
/*!
Material Components for the Web
Copyright (c) 2018 Google Inc.
Copyright (c) 2019 Google Inc.
License: MIT

@@ -78,3 +78,3 @@ */

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 101);
/******/ return __webpack_require__(__webpack_require__.s = 5);
/******/ })

@@ -84,9 +84,7 @@ /************************************************************************/

/***/ 101:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/***/ 5:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill__ = __webpack_require__(11);
/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "ponyfill", function() { return __WEBPACK_IMPORTED_MODULE_0__ponyfill__; });
/**

@@ -115,15 +113,13 @@ * @license

Object.defineProperty(exports, "__esModule", { value: true });
var ponyfill = __webpack_require__(6);
exports.ponyfill = ponyfill;
/***/ }),
/***/ 11:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/***/ 6:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closest", function() { return closest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matches", function() { return matches; });
/**

@@ -152,2 +148,3 @@ * @license

Object.defineProperty(exports, "__esModule", { value: true });
/**

@@ -157,35 +154,22 @@ * @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain.

*/
/**
* @param {!Element} element
* @param {string} selector
* @return {?Element}
*/
function closest(element, selector) {
if (element.closest) {
return element.closest(selector);
}
var el = element;
while (el) {
if (matches(el, selector)) {
return el;
if (element.closest) {
return element.closest(selector);
}
el = el.parentElement;
}
return null;
var el = element;
while (el) {
if (matches(el, selector)) {
return el;
}
el = el.parentElement;
}
return null;
}
/**
* @param {!Element} element
* @param {string} selector
* @return {boolean}
*/
exports.closest = closest;
function matches(element, selector) {
var nativeMatches = element.matches || element.webkitMatchesSelector || element.msMatchesSelector;
return nativeMatches.call(element, selector);
var nativeMatches = element.matches || element.webkitMatchesSelector || element.msMatchesSelector;
return nativeMatches.call(element, selector);
}
exports.matches = matches;
/***/ })

@@ -192,0 +176,0 @@

/*!
Material Components for the Web
Copyright (c) 2018 Google Inc.
Copyright (c) 2019 Google Inc.
License: MIT
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dom=t():(e.mdc=e.mdc||{},e.mdc.dom=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=101)}({101:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11);n.d(t,"ponyfill",function(){return r})},11:function(e,t,n){"use strict";/**
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dom=t():(e.mdc=e.mdc||{},e.mdc.dom=t())}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}({5:function(e,t,r){"use strict";/**
* @license

@@ -28,3 +28,25 @@ * Copyright 2018 Google Inc.

*/
function r(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(o(n,t))return n;n=n.parentElement}return null}function o(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"closest",function(){return r}),n.d(t,"matches",function(){return o})}})});
Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);t.ponyfill=n},6:function(e,t,r){"use strict";function n(e,t){if(e.closest)return e.closest(t);for(var r=e;r;){if(o(r,t))return r;r=r.parentElement}return null}function o(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
Object.defineProperty(t,"__esModule",{value:!0}),t.closest=n,t.matches=o}})});
//# sourceMappingURL=mdc.dom.min.js.map

@@ -23,5 +23,4 @@ /**

*/
import * as ponyfill from './ponyfill';
export {ponyfill};
export { ponyfill };
//# sourceMappingURL=index.js.map
{
"name": "@material/dom",
"description": "DOM manipulation utilities for Material Components for the web",
"version": "0.41.0",
"version": "1.0.0-0",
"license": "MIT",
"main": "dist/mdc.dom.js",
"module": "index.js",
"sideEffects": false,
"types": "dist/mdc.dom.d.ts",
"repository": {

@@ -13,3 +16,6 @@ "type": "git",

"access": "public"
},
"dependencies": {
"tslib": "^1.9.3"
}
}

@@ -23,3 +23,2 @@ /**

*/
/**

@@ -29,35 +28,21 @@ * @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain.

*/
/**
* @param {!Element} element
* @param {string} selector
* @return {?Element}
*/
function closest(element, selector) {
if (element.closest) {
return element.closest(selector);
}
let el = element;
while (el) {
if (matches(el, selector)) {
return el;
export function closest(element, selector) {
if (element.closest) {
return element.closest(selector);
}
el = el.parentElement;
}
return null;
var el = element;
while (el) {
if (matches(el, selector)) {
return el;
}
el = el.parentElement;
}
return null;
}
/**
* @param {!Element} element
* @param {string} selector
* @return {boolean}
*/
function matches(element, selector) {
const nativeMatches = element.matches
|| element.webkitMatchesSelector
|| element.msMatchesSelector;
return nativeMatches.call(element, selector);
export function matches(element, selector) {
var nativeMatches = element.matches
|| element.webkitMatchesSelector
|| element.msMatchesSelector;
return nativeMatches.call(element, selector);
}
export {closest, matches};
//# sourceMappingURL=ponyfill.js.map
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc