Intersection Observer options = { root: document.getElementById('#ancestor'), rootMargin: "0px", threshold: 0 }; Can be an element or null null == viewport
Intersection Observer options = { root: document.getElementById('#ancestor'), rootMargin: "0px", threshold: 0 }; Points where you want to get notified (callback to be called)
Intersection Observer options = { root: document.getElementById('#ancestor'), rootMargin: "0px", threshold: [0, 0.25, 0.5, 0.75, 1] }; Also accepts an Array Here we will be called 5 times at 25% intervals
requestIdleCallback options = { timeout: 1000 } Only accepts timeout as milliseconds If callback has not been called when timeout ends, callback will be called in the next idle period
Payment Request paymentResponse.complete("success").then(() => { window.alert("Thanks for giving us your money"); }); “success" can also be “error" or “unknown” (default value)
Web Bluetooth Bluetooth Low Energy (BLE) is different than good ol’ Bluetooth. BLE broadcasts the services it provides and you can filter only the devices you need before pairing.
Web Bluetooth navigator.bluetooth.requestDevice({ filters: [{ services: ["battery_service"]}] }).then((device) => { use device }; battery_service is just one of the many you can use here Here’s a list http://bit.ly/2HLqvHQ
Web Bluetooth Each type of service has a different way of doing things We will look the code in the demo navigator.bluetooth.requestDevice({ filters: [{ services: ["battery_service"]}] }).then((device) => { use device };