Lines Matching refs:messageEvent
45 export function postMessageHandler(messageEvent: MessageEvent) {
46 if (messageEvent.origin === 'https://tagassistant.google.com') {
57 if (messageEvent.source === null || messageEvent.source !== window.opener) {
62 if (!('data' in messageEvent)) {
66 if (messageEvent.data === 'PING') {
70 const windowSource = messageEvent.source as Window;
71 windowSource.postMessage('PONG', messageEvent.origin);
77 if (isPostedTraceWrapped(messageEvent.data)) {
78 postedTrace = sanitizePostedTrace(messageEvent.data.perfetto);
79 } else if (messageEvent.data instanceof ArrayBuffer) {
80 postedTrace = {title: 'External trace', buffer: messageEvent.data};
86 console.log('origin:', messageEvent.origin, 'data:', messageEvent.data);
102 if (isTrustedOrigin(messageEvent.origin)) {
112 m('div', `${messageEvent.origin} is trying to open a trace file.`),