This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file | |
* | |
* Module: Toggle. | |
* | |
* @author Jason D. Moss <[email protected]> | |
* @copyright 2024 Jason D. Moss. All rights reserved. | |
*/ | |
import { Exists } from "./exists.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Custom Web Component to 'progressively enhance' the <details> element used | |
* with our form filters. | |
* | |
* @author Jason D. Moss <[email protected]> | |
* @copyright 2024 Jason D. Moss. All rights reserved. | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components | |
* | |
* <details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill for `String.prototype.startsWith()` | |
* | |
* @return {Boolean} | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith | |
*/ | |
if (!String.prototype.startsWith) { | |
Object.defineProperty(String.prototype, "startsWith", { | |
value: function (search, pos) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill for `ChildNode.replaceWith()` | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/replaceWith | |
*/ | |
function replaceWith() | |
{ | |
"use-strict"; | |
var parent = this.parentNode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill for `Element.prototype.matches()` | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest | |
*/ | |
if (!Element.prototype.matches) { | |
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; | |
} | |
/* <> */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill for `IntersectionObserver` + `IntersectionObserverEntry` | |
* | |
* @copyright 2016 Google Inc. All Rights Reserved. | |
* @license https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document [W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE]. | |
* @link https://github.com/w3c/IntersectionObserver/ | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver | |
*/ | |
(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill for `String.prototype.includes()` | |
* | |
* @param {String} String to search for. | |
* @param {Integer} Start search at 'this' position. | |
* | |
* @return {Boolean} | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polofill for `Array.prototype.forEach()` | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach | |
*/ | |
if (!Array.prototype.forEach) { | |
Array.prototype.forEach = function (callback/*, thisArg*/) { | |
"use strict"; | |
var T, k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill for `Element.prototype.closest()` | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest | |
*/ | |
if (!Element.prototype.closest) { | |
Element.prototype.closest = function (s) { | |
"use strict"; | |
var el = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill for `Object.assign()` | |
* | |
* @return {String} Object target. | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign | |
*/ | |
if (typeof Object.assign !== "function") { | |
/** | |
* Must be writable: true, enumerable: false, configurable: true. |
NewerOlder