javascript - Checking the contents of an iframe -


i working on chrome extension helps me remember passwords websites, , needs detect web pages used login. via jquery call $("input:password"). however, ran website has login form inside iframe, , attempting call $("iframe").contents() resulted in error due cross-origin security.

is there way me reliably check contents of iframe? need know existence of password element, not interact in way.

use window.postmessage

code sample...

otherwindow.postmessage(message, targetorigin, [transfer]); 

code receivemessage

window.addeventlistener("message", receivemessage, false);  function receivemessage(event){    if (event.origin !== "http://example.org:8080")    return;    // ... } 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -