-
Notifications
You must be signed in to change notification settings - Fork 50.2k
Minimally support iframes (nested browsing contexts) in selection event handling #12037
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6940e33
Prefer node’s window and document over globals
acusti 3f3c1d7
Support active elements in nested browsing contexts
acusti b08a270
Merge branch 'master' into minimal-iframes
acusti 51be426
Avoid invoking defaultView getter unnecessarily
acusti 3714067
Prefer node’s window and document over globals
acusti 66b8766
Support active elements in nested browsing contexts
acusti 75bc65e
Avoid invoking defaultView getter unnecessarily
acusti 5a61b66
Implement selection event fixtures
f752792
Prefer node’s window and document over globals
acusti a8fcf05
Avoid invoking defaultView getter unnecessarily
acusti 0003681
Fix react-scripts to work with alphas after 16.0.0
fef8519
Run prettier on new selection events fixtures
799ee39
Add fixture for onSelect in iframes, remove DraftJS fixture
6e3d4b7
Merge branch 'minimal-iframes' of github.com:brandcast/react into min…
acusti d1ad016
Purge remnants of draft.js from fixtures
acusti 3c32963
Use prop-types import instead of window global
acusti 3f7b5c5
Make fixtures’ Iframe component Firefox-compatible
acusti 05d8969
Merge branch 'master' into minimal-iframes
acusti a776570
Merge branch 'master' into minimal-iframes
acusti 26e9d82
Merge branch 'master' into minimal-iframes
wilsonhyng 4db5c44
Fix switch case for SelectionEventsFixture
wilsonhyng ccf0329
Remove draft.js / immutable.js dependencies
wilsonhyng 2edf1f8
Cache owner doc as var to avoid reading it twice
wilsonhyng db02b65
Add documentation for getActiveElementDeep to explain try/catch
wilsonhyng 75b9992
Ensure getActiveElement always returns DOM element
wilsonhyng 0f1de45
Tighten up isNode and isTextNode
wilsonhyng 95b2aef
Remove ie8 compatibility
wilsonhyng d997ba8
Specify cross-origin example in getActiveElementDeep
wilsonhyng e63391c
Revert back to returning null if document is not defined
wilsonhyng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Specify cross-origin example in getActiveElementDeep
- Loading branch information
commit d997ba8ee18d39c308d65f07b080ec45bae8ba27
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly are we catching here? Is it
defaultViewaccess throwing? Or do we expectcontentDocumentto potentially be missing?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you just try to access the contentDocument of an
HTMLIframeElementthat comes from a non-matching (separate) domain (like if there’s an embedded YouTube player in the DOM), the browser will throw an error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment to this line describing such a scenario?