SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement':

279 views
Skip to first unread message

Dev Dev

unread,
Jun 1, 2015, 10:32:20 PM6/1/15
to ang...@googlegroups.com



I have an iframe directive and when the page load, I get a cross domain access denied. Is there a way to configure in Angular to by pass cross domain e.g. $sce.trustAsResourceUrl ?

HTML:

JS:

$scope.page = { url: 'SOME CROSS DOMAIN', trustSrc: function(src) { return $sce.trustAsResourceUrl(src); } }

Error:

Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement':

Blocked a frame with origin "http://localhost:8080" from accessing a frame with origin

Protocols, domains, and ports must match.


StackOverflow:
Reply all
Reply to author
Forward
0 new messages