The Wayback Machine - https://web.archive.org/web/20201026150400/https://github.com/mdbootstrap/perfect-scrollbar/pull/971
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

check if activeElement.contentDocument is null #971

Open
wants to merge 1 commit into
base: master
from

Conversation

@alanhchoi
Copy link

@alanhchoi alanhchoi commented Sep 1, 2020

contentDocument can be null if an iframe and the iframe's parent document are not in the same origin.
I cannot reproduce this on JSFiddle, but I'm getting a bunch of error logs from Sentry on this line.
It started to happen when we've added one tap Google sign in on our website, which depends on an iframe embedding a document from Google.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentDocument

Thank you very much for your contribution! Please make sure the followings
are checked.

  • Read CONTRIBUTING.md
  • Run npm test to make sure it formats and build successfully
  • Provide the scenario this PR will address(some JSFiddles will be perfect)
  • Refer to concerning issues if exist
contentDocument can be null if the iframe and the iframe's parent document are not in the same origin.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentDocument
@alanhchoi alanhchoi marked this pull request as ready for review Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.