Back to Snippets

Snippets

List of snippets

bareTag()
a tag function for template literals that works as if the template was untagged.
debug.css
CSS styles to point out problems with the HTML markup.
downloadFile()
download a runtime-generated file with JavaScript.
encodeHTML*()
encode untrusted strings using HTML entities, for insertion in HTML contexts.
formDataMap()
get useful values out of form fields.
getDOMEvents()
get all events attached to a DOM element (Chromium-only).
highlight​Elements​Matching()
highlight DOM elements matching a function.
isCssContainingBlock()
returns whether a DOM element is a CSS containing block.
isCssStackingContext()
returns whether a DOM element (or pseudo-element) creates a new CSS stacking context.
isElementPokingOut()
returns whether a DOM element is causing a horizontal scrollbar due to its poking outside the viewport bounds.
reset.css
better default styles.
stringToUtf16()
convert a JavaScript string to an UTF-16 TypedArray.
wordsByFrequency()
count the number of occurrences of each word.
wordsUnique()
return the set of unique words.

Elsewhere