MCPcopy Create free account
hub / github.com/GoogleChrome/samples / maybeSetFruit

Function maybeSetFruit

presentation-api/receiver/receiver.js:51–56  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

49};
50
51function maybeSetFruit(message) {
52 const fruit = message.toLowerCase();
53 if (fruit in fruitEmoji) {
54 document.querySelector('#main').textContent = fruitEmoji[fruit];
55 }
56};
57
58document.addEventListener('DOMContentLoaded', function() {
59 if (navigator.presentation.receiver) {

Callers 1

addConnectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected