Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tries to access frame.contentWindow too early #5

Closed
appden opened this issue May 17, 2010 · 2 comments
Closed

Tries to access frame.contentWindow too early #5

appden opened this issue May 17, 2010 · 2 comments

Comments

@appden
Copy link

appden commented May 17, 2010

I'm getting a this.win is null error in WebKit browsers because this.win = frame.contentWindow is done before the frame is ready. Running that block of code at the bottom of the constructor in a setTimeout alleviates this problem, though it probably should be done on the load event.

@marijnh
Copy link
Member

marijnh commented May 18, 2010

Which browser (type, version, platform) is this? None of the Safari or Chrome versions I tried have this problem. Do the demo pages show the issue?

@dyoo
Copy link

dyoo commented Aug 18, 2010

One thing to be careful of is that the dom element given to the constructor of CodeMirror must already be attached to document's DOM. Otherwise, Bad Things happen. This is because iframe.contentWindow will be null until the iframe's attached to the window.

This issue was closed.
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

No branches or pull requests

3 participants