I am trying to get a content window of an iframe.
In JQuery I have been doing this:
$('#loginframe')[0].contentWindow
However, I am unable to use JQuery in angular so trying to do this in a native way without much success:
var iframe = document.getElementById('loginframe');
var insideDoc = (iframe.contentWindow || iframe.contentDocument);
What is the correct way to do this?
Thanks!
document.getElementById('loginframe').contentWindowshould work. Whenever you ask a question, please explain what the problem was and any error messages. See stackoverflow.com/questions/19693984/…