beforeinstallprompt
prompt()
let installPromptEvent; window.addEventListener('beforeinstallprompt', (event) => { // Prevent Chrome <= 67 from automatically showing the prompt event.preventDefault(); // Stash the event so it can be triggered later. installPromptEvent = event; // Update UI notify the user they can add to home screen document.querySelector('#install-button').disabled = false; });
beforeinstallpromptevent
const request = new PaymentRequest([{ // Your custom payment method identifier comes here supportedMethods: 'https://bobpay.xyz/pay' }], { total: { label: 'total', amount: { value: '10', currency: 'USD' } } });
sandbox
iframe
freeze
resume
document.wasDiscarded
chrome://discards
overflow
overflow-x
overflow-y
object-position
perspective-origin
"top right 20%"
'dppx'
'x'
Gamepad.timestamp
DOMHighResTimeStamp
PerformanceTiming.navigationStart
innerHTML
Cmd-Tab
Alt-Tab
Esc
fromElement
toElement
PointerEvents
MouseEvent
PointerEvent
target
relatedTarget
TouchEvent
navigator.vibrate()
AudioParam.automationRate
AudioParam
BiquadFilterNode
importScripts
ServiceWorkerRegistration.updateViaCache
brightness()
Touch()
document.createTouch()
Document.selectedStylesheetSet
Document.preferredStylesheetSet
{ "message": { "webpush": { "notification": { "title": "Fish Photos 🐟", "body": "Thanks for signing up for Fish Photos! You now will receive fun daily photos of fish!", "icon": "firebase-logo.png", "image": "guppies.jpg", "data": { "notificationType": "fishPhoto", "photoId": "123456" }, "click_action": "https://example.com/fish_photos", "actions": [ { "title": "Like", "action": "like", "icon": "icons/heart.png" }, { "title": "Unsubscribe", "action": "unsubscribe", "icon": "icons/cross.png" } ] } }, "token": "<APP_INSTANCE_REGISTRATION_TOKEN>" } }
like
unsubscribe
// Retrieve an instance of Firebase Messaging so that it can handle background messages. const messaging = firebase.messaging(); // Add an event listener to handle notification clicks self.addEventListener('notificationclick', function(event) { if (event.action === 'like') { // Like button was clicked const photoId = event.notification.data.photoId; like(photoId); } else if (event.action === 'unsubscribe') { // Unsubscribe button was clicked const notificationType = event.notification.data.notificationType; unsubscribe(notificationType); } event.notification.close(); });
function processEvent(req, rsp) { var event = req.body; // event type received var message; // JSON response message if (event.type == 'REMOVED_FROM_SPACE') { // no response as bot removed from room return; } else if (event.type == 'ADDED_TO_SPACE') { // bot added to room; send welcome message message = {text: 'Thanks for adding me!'}; } else if (event.type == 'MESSAGE') { // message received during normal operation message = responseForMsg(event.message.text); } else if (event.type == 'CARD_CLICKED') { // user-click on card UI var action = event.action; message = responseForClick( action.actionMethodName, action.parameters); } rsp.send(message); };
GoogleAdsService.Search
RecommendationService
fun Int.print() = println(this) 5.print() // prints 5
fun Context.toast(text: CharSequence, duration: Int = Toast.LENGTH_SHORT): Toast { return Toast.makeText(this, text, duration).apply { show() } } toast("Hello Toast")
class AquariumPlant( val color: String) fun AquariumPlant.print() = println("Pretty Aquarium Plant") val plant = AquariumPlant("green") plant.print() // prints -> Pretty Aquarium Plant
setAllowGeneratedReplies
NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_reply_white_24dp, replyLabel, replyPendingIntent) .addRemoteInput(remoteInput) .setAllowGeneratedReplies(true) // <--- true to enable smart replies // Wear OS requires a hint to display the reply action inline. .extend(new NotificationCompat.Action.WearableExtender() .setHintDisplayActionInline(true)) .build();
MessagingStyle
gradle.properties
android.enableJetifier = true
com.android.tools.build:gradle:3.2.0-alpha14
android.enableR8=true
./adb emu avd snapshot load snap_2018-04-29_00-01-12
./adb emu screenrecord start --time-limit 10 /sample_video.webm
startMethodTracing(String tracePath)
stopMethodTracing()