This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
function getElementXPath(element) { | |
if (element && element.id) | |
return '//*[@id="' + element.id + '"]'; | |
else | |
return getElementTreeXPath(element); | |
} | |
function getElementTreeXPath(element) { | |
var paths = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker.postMessage('example', {transfer: [a,b]}); | |
will be equivalent to | |
worker.postMessage('example', [a, b]); | |
window.postMessage('example', 'http://example.com'); | |
will be equivalent to | |
window.postMessage('example', {targetOrigin: 'http://example.com'}); |