Ver Fonte

register message handler on capture and stop the event

Gildas há 7 anos atrás
pai
commit
db3d4ff3bc
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      lib/single-file/frame-tree.js

+ 3 - 1
lib/single-file/frame-tree.js

@@ -49,8 +49,10 @@ this.frameTree = this.frameTree || (() => {
 				const port = event.ports[0];
 				port.onmessage = event => initResponse(event.data);
 			}
+			event.preventDefault();
+			event.stopPropagation();
 		}
-	}, false);
+	}, true);
 	return {
 		getAsync: async options => {
 			const sessionId = options.sessionId;