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

Add IE11 support #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add IE11 support #61

wants to merge 2 commits into from

Conversation

rake5k
Copy link

@rake5k rake5k commented Jul 25, 2017

Now using a MutationObserver instead, solution proposed by @notatestuser (#43 (comment)).

emitChange(evt) {
if (!this.htmlEl) return;
var html = this.htmlEl.innerHTML;
if (this.props.onChange && html !== this.lastHtml) {
evt.target = { value: html };
this.props.onChange(evt);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to somehow pass the html to onChange!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it enough to get the whole MutationRecord (=evt) in onChange? The element's innerHtml is then accessible via evt.target.innerHtml.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on the node you're getting. In my case I get a text node so evt.target.innerHTML isn't a thing. Drop document.createTextNode('') in your console to see what's there.

@rake5k
Copy link
Author

rake5k commented Aug 14, 2017

@lovasoa @notatestuser I re-added html to the value parameter. What do you think now about this PR?

@mccambridge
Copy link

This was opened a year ago. Any chance this ever gets merged?

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.

None yet

3 participants