async & defer! MDN上是这么说的 async 对于普通脚本,如果存在async属性,那么普通脚本会被并行请求,并尽快解析和执行。 对于模块脚本,如果存在async属性,那么脚本及其所有依赖都会在延缓队列中执行,因此它们会被并行请求,并尽快解析和执行。 该属性能够消除解析阻塞的 Javascript。解析阻塞的 Javascript 会导致浏览器必须...
This library just provides a few thin wrappers around core JScryptofunctions with sane defaults. I mostly adapted these functions from the following MDN articles: I also followed these recommendations, which are describedhere: PBKDF2 w/ 32-byte salt w/ SHA-512 @ 210,000 iterations ...
Noticed that self.crypto is supported by all major browsers now, but missing in jsdom. There is this excellent project - https://github.com/anvilresearch/webcrypto W3C Web Cryptography API for Node.js The require('@trust/webcrypto') object is compatible with window.crypto (MDN) Although,...
A quick (< 10 lines) version of MDNsfunction to get the SHA256 hash of a string Quick reminder that I am a strange person on the internet Read the code, check it's correct, compare it to MDN version, make sure the built version is the same, and compare with the Linux command line...