My meteor app is inside iframe (<iframe src="http://myApp.meteor.com"></iframe>
), and I want to access parent property. It’s possible?
My page:
<!DOCTYPE html>
<html>
<body>
<div id="myDiv">old text</div>
<iframe src="http://myApp.meteor.com"></iframe>
</body>
</html>
Meteor app client code:
Template.myApp.rendered = function () {
parent.document.getElementById('#myDiv').innerHTML = 'new text';
};
Error:
Exception from Tracker afterFlush function: Permission denied to access property “document”