- method attached to DOM element
- vendor-prefixed :(
- webkit, moz
element#[prefix]requestFull(s||S)creen
- avoid fullscreen-ing the body element. Causes odd behavior
- lets dev know when user has switch windows or tabs
- can save resources (animation/ajax)
- vendor-prefixed :(
- webkit, moz, ms
- a document event called
[prefix]visibilitychange
, determined bydocument.[prefix](h/H)idden
- gives dev access to users audio-visual devices (camera and mic)
navigator.mediaDevices.getUserMedia(constraints)
- very high-resolution monotonic clock and performance stats
performance.now()
performance.navigation
performance.timing
performance.mark(name)
performance.measure(name, start, end)
- Getting Entries'
new Worker(url_to_worker)
- messages are sent between worker and parent through
postMessage
- messages are received between worker and parent through
onmessage
- Stop a worker by
worker.terminate()
or internally asclose()
- More workers will give diminished returns. Keep to around
navigator.hardwareConcurrency
- Workers have access to the
importScripts(url[s])
function. runs code inurl[s]
SharedWorker
s- communicate via a port object
- API to manipulate storage object in browser
- Local storage has no expiration date
- Session storage last until browser is closed
- Storage Object
length
key(n)
getItem(key)
setItem(key, value)
removeItem(key)
clear()
- transactional database system that store large files, blobs, and other structured data
- uses indexes for fast high-performance lookup
- stores objects supported by the structured clone algorithm (see below)
- Flow:
- Specify Schema
- Open DB connection
- Make transactions
- Alternative to JSON
- Allows the cloning of cyclic graphs, aka objects that reference other other objects that are in the graph
- Allows the cloning of RegEx, Blobs, Files, ImageData, unlike JSON
- Can't clone functions, dom elements, or errors
- Not a deep copy. Doesn't walk up the prototype chain
The Jist: Look at each field and copy it over. If it's an object, recurse into in and copy those fields over
- API for making offline a better experience
- specify a default offline experience w/ a cache
- require client server coordination
- client
- server
navigator.vibrate(ms/pattern)
- return false if not using a phone