View interactivecontent.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
/* | |
needed to manage tab focus (focusin) events leading to the following selector to adjust; | |
reference | |
* https://html.spec.whatwg.org/multipage/dom.html#interactive-content | |
additional info: | |
* https://www.tpgi.com/using-the-tabindex-attribute/ | |
* https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex | |
and various linked/related in the above (or simply Google a bit) | |
*/ |
View deps.bundle.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
(function() { | |
'use strict'; | |
if (typeof document === 'undefined' || 'adoptedStyleSheets' in document) { | |
return; | |
} | |
var hasShadyCss = 'ShadyCSS' in window && !ShadyCSS.nativeShadow; | |
var bootstrapper = document.implementation.createHTMLDocument(''); | |
var closedShadowRootRegistry = new WeakMap(); | |
var _DOMException = typeof DOMException === 'object' ? Error : DOMException; | |
var defineProperty = Object.defineProperty; |
View uitest.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
import puppeteer from 'https://deno.land/x/puppeteer/mod.ts'; | |
import { assert } from 'https://deno.land/std/testing/asserts.ts'; | |
/* | |
related: | |
async runTests() | |
https://github.com/denoland/deno/issues/10941 | |
https://github.com/denoland/deno_std/issues/162 | |
discussion of testing API |
View polyfill.Events.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
if( !('SubmitEvent' in self && 'submitter' in SubmitEvent.prototype) ){ | |
// polyfill SubmitEvent.submitter (a Safari issue as-of 2021) | |
// https://developer.mozilla.org/docs/Web/API/SubmitEvent | |
const submitter = Symbol.for('submitter'); | |
Event[ submitter ] = null; | |
const submitterSelector = 'input[type=submit], input[type=image], input[type=button], button'; | |
Object.defineProperty(Event.prototype, 'submitter', { | |
get: function(){ | |
if('submit' === this.type){ |
View .dockerignore
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
# TODO cleanup | |
log/ | |
logs/ | |
**/log/ | |
**/logs/ | |
**/*.log | |
secrets.txt | |
.git |
View ReactHTM.html
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" > | |
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"> | |
<title>use HTM to reduce work in React apps</title> | |
<meta name="description" content="example using HTM with React to replace JSX and reduce work"> | |
<style> | |
html,body{margin:0;padding:0;min-width:320px;min-height:320px;box-sizing:border-box;background-color:#cf0;} | |
body{ |
View websockets.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
/* | |
running with Deno 1.2 | |
deno run --inspect --allow-net ./websockets.js | |
*/ | |
import { Application, Router, HttpError, send, Status } from "https://deno.land/x/oak@v6.0.1/mod.ts"; | |
import { isWebSocketCloseEvent } from "https://deno.land/std@0.61.0/ws/mod.ts"; | |
const port = 8123; | |
const users = new Set(); | |
const app = new Application({state:{users}}); |
View linkedlist.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
/* | |
add,remove,length, reverse | |
{value,next} | |
*/ | |
class List{ | |
constructor(){ | |
} | |
} | |
class Node{ |
View jsx-template-transformer.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
/* | |
transform JSX to tagged template literals | |
history: | |
2019-01-25 initial working draft | |
https://stackoverflow.com/a/54381294/965666 | |
https://astexplorer.net/#/gist/fdaed19a884dc75fe4a92092826bd635/9bc3c34e276eaf74cc318da9b87bbe0cfd37ff6d | |
https://astexplorer.net/#/gist/fdaed19a884dc75fe4a92092826bd635/9a47a064fe0734868f8c5c46ceb99de6ebfe3600 |
View flat-arbitrary.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
/* | |
Write some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
Your solution should be a link to a gist on gist.github.com with your implementation. | |
When writing this code, you can use any language you're comfortable with. The code must be well tested and documented. Please include unit tests and any documentation you feel is necessary. In general, treat the quality of the code as if it was ready to ship to production. | |
Try to avoid using language defined methods like Ruby's Array#flatten or JavaScript's Array.flat. | |
*/ |
NewerOlder