function matches( element, selector ) { const ep = Element.prototype; // modern browsers support `matches` but IE11 and older safari support it as `matchesSelector` with a prefix const matcher = ep.matches || ep.webkitMatchesSelector || ep.mozMatchesSelector || ep.msMatchesSelector; if ( ! matcher ) { return false; } return matcher.call( element, selector ); }
Object.defineProperty(window.Blob.prototype, 'name', { get: function () { return this.$ngfName;
/* eslint-env mocha, browser */ /* global proclaim */ it('is a function', function () { proclaim.isFunction(NodeList.prototype.forEach); });
Object.defineProperty(Element.prototype, 'inert', { enumerable: true, /** @this {!Element} */ get: function get() { return this.hasAttribute('inert'); }, /** @this {!Element} */ set: function set(inert) { inertManager.setInert(this, inert); } });
function (a) { a.matchesSelector = a.matchesSelector || a.mozMatchesSelector || a.msMatchesSelector || a.oMatchesSelector || a.webkitMatchesSelector || function (a) { for (var b = this, c = (b.parentNode || b.document).querySelectorAll(a), d = -1; c[++d] && c[d] !== b;); return !!c[d]; }; }(Element.prototype)
function(nativeFunc, undef) { return function(deep) { if (deep === undef) { deep = false; } var clone = nativeFunc.call(this, deep); if ('checked' in this) clone.checked = this.checked; return clone; }; }(Element.prototype.cloneNode)
[ Node, Window ].forEach(function(constructor) { var p = constructor.prototype; methodNames.forEach(function(name) { Object.defineProperty(p, name + "_", { value: p[name] }); }); });
Object.defineProperty(Element.prototype, "nextElementSibling", { get: function(){ var el = this.nextSibling; while (el && el.nodeType !== 1) { el = el.nextSibling; } return el; } });
function getterAndSetterRequiresRendering(name) { Object.defineProperty(HTMLElement.prototype, name, { get: getter(name), set: function(v) { scope.renderAllPending(); unsafeUnwrap(this)[name] = v; }, configurable: true, enumerable: true }); }
Object.defineProperty(Element.prototype, 'previousElementSibling', { get: function(){ var el = this.previousSibling; while (el && el.nodeType !== 1) { el = el.previousSibling; } return el; } });
// Minimal polyfill for Edge 15's lack of `isIntersecting` // See: https://github.com/w3c/IntersectionObserver/issues/211 Object.defineProperty(IntersectionObserverEntry.prototype, 'isIntersecting', { get: function () { return this.intersectionRatio > 0; } } );
[ Node, Window ].forEach(function(constructor) { var p = constructor.prototype; methodNames.forEach(function(name) { Object.defineProperty(p, name + "_", { value: p[name] }); }); });
Object.defineProperty(Element.prototype, 'nextElementSibling',{ get: function(){ var el = this.nextSibling; while(el){ if(el.nodeType ===1){ return el; } el = el.nextSibling; } return null; } });