Skip to content

Instantly share code, notes, and snippets.

View snehalbaghel's full-sized avatar
🎯
Focusing

Snehal Baghel snehalbaghel

🎯
Focusing
View GitHub Profile
@snehalbaghel
snehalbaghel / debug-on-redirect.js
Created May 26, 2022 08:58
debug-on-redirect.js
window.addEventListener("beforeunload", function() { debugger; }, false)
@snehalbaghel
snehalbaghel / listFonts.js
Created May 21, 2022 07:56
List al available fonts in a document
// Credits: https://stackoverflow.com/a/62399430/4988995
function listFonts() {
let { fonts } = document;
const it = fonts.entries();
let arr = [];
let done = false;
while (!done) {
const font = it.next();

To be a layout boundary, the element must:

  • Be an SVG root (<svg>).
  • Be a text or search <input> field.

or:

  • Not be display inline or inline-block
  • Not have a percentage height value.
  • Not have an implicit or auto height value.