Black list more origins
See original GitHub issueHello Iframe Resizers,
I am working on a project called Boomerang JS which is a performance tracking JS library - https://github.com/akamai/boomerang . For our clients we include our library in special Iframe for performance reasons.
This iframe doesn’t point to real url but we have 3 variations where it points to:
<iframe src="about:blank" ...
<iframe src="javascript:void(0)" ...
<iframe src="..." ...
We noticed that this is causing a problem when Iframe Resizer is calling postMessage():
VM247:1 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin 'about:blank' in a call to 'postMessage'.
at <anonymous>:1:8
We instructed our clients to try checkOrigin: false
or checkOrigin: ["https://www.example.com"]
in order to resolve the problem but we would try to make things smooth in the future.
I see that Iframe Resizer is already a check for file://
here:
function getTargetOrigin(remoteHost) {
return '' === remoteHost || 'file://' === remoteHost ? '*' : remoteHost
}
Do you think that we can add at least about:blank
and javascript:void(0)
check in order to black list those “Origins”? If yes I will be happy to contribute with a pull request.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top GitHub Comments
Thanks for fixing the test as well. Help is always welcome, if you want to look at the outstanding issues 😃
Oh I think I better understand what your asking now, happy to take a PR for that