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" /> | |
<title>@starting-style</title> | |
<style> | |
body, | |
h1 { | |
margin: 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
// Add click event listener to a button | |
document.querySelector('button').addEventListener('click', async () => { | |
try { | |
const filename = 'sample.csv.gz'; | |
// Open a file picker dialog and get a handle to the file | |
const fileHandle = await window.showSaveFilePicker({ | |
suggestedName: filename.slice(0, -'.csv.gz'.length), // Remove .csv.gz extension | |
types: [ | |
{ |
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 type { DialogHTMLAttributes } from "react"; | |
import { forwardRef, useCallback, useEffect, useState } from "react"; | |
declare global { | |
interface HTMLDialogElement { | |
show(): void; | |
showModal(): void; | |
close(): void; | |
} | |
} |
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
- WebAssembly | |
- WASM | |
- WebAssembly の略 | |
- WASI | |
- WebAssembly System Interface | |
- WebAssembly をウェブの外で使うためのシステムインターフェース | |
- \*.wat | |
- テキストファイル | |
- \*.wasm | |
- バイナリファイル |
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 'use strict' mode, TypeErrors occurs*/ | |
/** | |
* freeze object deeply | |
* | |
* @param {{}} object | |
*/ | |
const deepFreeze = (object) => { | |
Object.freeze(object); |
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
const SEQUENCE = "sequence"; | |
const PARALLEL = "parallel"; | |
/** | |
* wait | |
* | |
* @param s | |
* @return {Promise} | |
*/ | |
const wait = (s) => { |
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
const foo = "foo"; | |
// use Array.from | |
console.log("Array.from", Array.from(foo)); // [ 'f', 'o', 'o' ] | |
// use ES6 Array spread and Array.of function | |
console.log(Array.of(...foo)); // [ 'f', 'o', 'o' ] | |
// use ES6 Array spread and array literal | |
console.log([...foo]); // [ 'f', 'o', 'o' ] |
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="ja"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>postion: stickey; demo</title> | |
<link | |
rel="stylesheet" | |
href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css" | |
/> | |
<style> |
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="ja"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>object-fit demo</title> | |
<link | |
rel="stylesheet" | |
href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css" | |
/> | |
<style> |