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.
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
Post a Comment