Skip to content

Resolve 'frame is null' errors#7

Closed
kennethkufluk wants to merge 1 commit intonecolas:masterfrom
kennethkufluk:patch-1
Closed

Resolve 'frame is null' errors#7
kennethkufluk wants to merge 1 commit intonecolas:masterfrom
kennethkufluk:patch-1

Conversation

@kennethkufluk
Copy link
Collaborator

As shown in pull request oyvindkinsey/easyXDM#120 and currently shown on twitter.com home timeline when scrolling rapidly, the waitForReady function can complain that the frame is null. The probable cause is that the waitForReady method isn't torn down in the destroy method. So if an iframe is destroyed before it initialises, it can throw this kind of error.

twitter.com:
Uncaught TypeError: Cannot read property 'contentWindow' of null

I've pulled out the function and added an unbind. I think this makes sense.

As shown in pull request #120 and currently shown on twitter.com home timeline when scrolling rapidly, the waitForReady function can complain that the frame is null. The probable cause is that the waitForReady method isn't torn down in the destroy method. So if an iframe is destroyed before it initialises, it can throw this kind of error.

twitter.com:
`Uncaught TypeError: Cannot read property 'contentWindow' of null`

I've pulled out the function and added an unbind. I think this makes sense.
@necolas
Copy link
Owner

necolas commented Mar 8, 2016

applied in fcbdef9

@necolas necolas closed this Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants