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 <jason@jdmlabs.com> | |
* @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 <jason@jdmlabs.com> | |
* @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
<?php | |
/** | |
* Convert a SimpleXML object to an associative array | |
* | |
* @param object $xmlObject | |
* | |
* @return array | |
* @access public | |
*/ |
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
<?php | |
/** | |
* Strip the namespace from the class to get the actual class name | |
* | |
* @param string $obj Class name with full namespace | |
* | |
* @return string | |
* @access public | |
*/ |
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
.reader, | |
.sr-only, | |
.text-assistive { | |
clip: rect(0 0 0 0); | |
overflow: hidden; | |
position: absolute; | |
width: 1px; | |
height: 1px; | |
margin: -1px; | |
padding: 0; |
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
/** | |
* 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 `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; | |
} | |
/* <> */ |
NewerOlder