Closed aik099 closed 6 years ago
Good point! Thanks!
Will fix that in a few days.
I've fixed it locally by changing if (event.element.length) {
into if (event.element !== scopedWindow && event.element.length) {
.
Fixed in baron@3.0.2
@aik099 thanks again)
I'm not seeing this release at https://github.com/Diokuz/baron/releases. Do you tag new releases, so that people could compare changes made between releases?
When there are
<iframe>
elements on the page, thenwindow.length
property (see https://developer.mozilla.org/en-US/docs/Web/API/Window/length) will indicate iframe count.Unfortunately https://github.com/Diokuz/baron/blob/master/src/core.js#L298-L301 code, that sets event listeners on the elements considers elements with
.length
property to be an array and attempts to iterate over them.In my case iframes come from different domain and that causes
Blocked a frame with origin "..." from accessing a cross-origin frame
error to happen.