Allow all events to be attached to the inner iFrame#3
Merged
developit merged 3 commits intodevelopit:masterfrom Jun 15, 2017
pl12133:feature/proxy-all-events
Merged
Allow all events to be attached to the inner iFrame#3developit merged 3 commits intodevelopit:masterfrom pl12133:feature/proxy-all-events
developit merged 3 commits intodevelopit:masterfrom
pl12133:feature/proxy-all-events
Conversation
…Area>. Pass the entire event object to event handlers in `handleEvent`. Use `partitionEventHandlers` to delete event handlers from props.
developit
reviewed
Jun 15, 2017
src/partition-event-handlers.js
Outdated
| export default function partitionEventHandlers({ ...props }, withOrWithout) { | ||
| let key; | ||
| for (key in props) if (props.hasOwnProperty(key)) { | ||
| if (/^on/i.test(key) ^ withOrWithout === true) { |
Owner
There was a problem hiding this comment.
almost too clever ;)
might be worth building up the returned props here instead of cloning and deleting, would be better for perf
Author
There was a problem hiding this comment.
Sounds good, switched over to accumulating instead of clone + deleting.
developit
approved these changes
Jun 15, 2017
…the input object.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I would like to have the frame of the
<RichTextArea>be able to accept any event handler, in order to do things like handle thedropevent for enabling drag/drop.I also want to pass the entire
eventobject on when calling event handlers.Let me know if these seem like disruptive changes, or if I am missing something about attaching handlers to the inner frame. Thanks!