2019独角兽企业重金招聘Python工程师标准>>>
"~" operator in javascript. For anyone else who also didn't know what it does: it converts -1 to 0,可以节省用来比较-1的情况,如
if (~event.origin.indexOf('http://yoursite.com')) { // The data has been sent from your site // The data sent with postMessage is stored in event.data console.log(event.data); }