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
// https://developers.google.com/web/updates/2017/08/estimating-available-storage-space | |
const storageManager = navigator.storage | |
// 当前空间使用率 | |
window.log = () => { | |
storageManager | |
.estimate() | |
.then(estimate => | |
console.log( |
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
# 编译使用LLVM的实验性WASM编译器 | |
# 编译支持 | |
# [Cloudflare Workers WebAssembly Demo](http://www.joyk.com/dig/detail/1538467210844002) | |
# [lldでwasmをリンクするまで](https://qiita.com/chikoski/items/41853dfb2afdec52e7d1) | |
# [Using LLVM from Rust to generate WebAssembly binaries](https://medium.com/@jayphelps/using-llvm-from-rust-to-generate-webassembly-93e8c193fdb4) | |
# [Notes on working with C and WebAssembly](https://aransentin.github.io/cwasm/) | |
# llvm编译文档 | |
# https://clang.llvm.org/get_started.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
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence | |
(function(win, doc){ | |
if(win.addEventListener)return; //No need to polyfill | |
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}} | |
function addEvent(on, fn, self){ | |
return (self = this).attachEvent('on' + on, function(e){ | |
var e = e || win.event; | |
e.preventDefault = e.preventDefault || function(){e.returnValue = false} | |
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true} |