alert
, confirm
, prompt
).window.requestIdleCallback(cb); // Runs during browser's idle time
input.files || e.dataTransfer.files; // => Blob[]
const reader = new FileReader();
reader.readAsDataURL(file) //reader has many events
img.src = URL.createObjectURL(file); //image preview
href
, pathname
, search
, hash
location.assign(url);
location.replace(url);
location.reload(true);
new URLSearchParams(location.search); // Like a Map
Access user agent and device info:
navigator.userAgentData.brands
navigator.deviceMemory
navigator.language
Beacon API (send lightweight analytics):
navigator.sendBeacon(url, data);