This file contains hidden or 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
| 'use strict'; | |
| document.head.innerHTML = ''; | |
| document.body.innerHTML = ''; | |
| [0, 1].forEach((i) => { | |
| const iframe = document.createElement('iframe'); | |
| iframe.src = location.href; | |
| iframe.style.position = 'fixed'; | |
| iframe.style.left = (i === 0 ? '0' : '50vw'); |
This file contains hidden or 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
| 'use strict'; | |
| // type Item = { | |
| // // Default: 1 | |
| // preferenceWeight: number; | |
| // | |
| // // Should be initialized with preferenceWeight | |
| // weight: number; | |
| // }; | |
| // |
This file contains hidden or 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
| (async function() { | |
| let headHTML = document.head.innerHTML; | |
| await Promise.all( | |
| Array.from(document.head.querySelectorAll('link[rel=stylesheet]')) | |
| .map(el => fetch(el.href) | |
| .then(res => res.text()) | |
| .then((cssTxt) => { | |
| headHTML += `<style>\n${cssTxt}\n</style>`; | |
| }) |
This file contains hidden or 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
| 'use strict'; | |
| export default function mapcat(elements, fn) { | |
| return (function* () { | |
| for (const el of elements) { | |
| for (const newEl of fn(el)) { | |
| yield newEl; | |
| } | |
| } | |
| })(); |
This file contains hidden or 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
| /------------------------------------------------------------------------------------------------------------\ | |
| | high isolation | partial isolation / uses part of the system | uses the full system | | |
| |------------------------+----------------------------------------------------+------------------------------| | |
| | | | | | |
| | | Not unit tests, so they're integration tests? | | | |
| | DEFINITELY | Not integration tests, so they're unit tests? | DEFINITELY | | |
| | UNIT TESTS | Maybe these tests are forbidden? | INTEGRATION TESTS | | |
| | | Maybe these tests aren't useful? | | | |
| | | Or maybe they're not possible? | | | |
| | |
This file contains hidden or 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
| 'use strict'; | |
| (async () => { | |
| const stream = await navigator.mediaDevices.getUserMedia({ video: true }); | |
| const vid = document.createElement('video'); | |
| vid.srcObject = stream; | |
| document.body.appendChild(vid); | |
| vid.style.position = 'absolute'; | |
| vid.style.left = '0px'; | |
| vid.style.top = '0px'; |
This file contains hidden or 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
| 'use strict'; | |
| (async () => { | |
| const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true }); | |
| const vid = document.createElement('video'); | |
| vid.srcObject = stream; | |
| document.body.appendChild(vid); | |
| vid.style.position = 'absolute'; | |
| vid.style.left = '0px'; |
I hereby claim:
- I am voltrevo on github.
- I am voltrevo (https://keybase.io/voltrevo) on keybase.
- I have a public key ASBi6AfkwLtxJNhhHWo0HtCatNDoo3i5Fx7_Nzn1xSXbKgo
To claim this, I am signing this object:
This file contains hidden or 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> | |
| <head> | |
| <title>Hello World!</title> | |
| </head> | |
| <body> | |
| Hello World! | |
| </body> | |
| </html> |