Skip to content
Advertisement

HTML5 event for `onselectionchange`

Is there a standard cross-browser HTML5 event which corresponds to IE legacy onselectionchange (so it is fired when the current selection changes)?

EDITED, I’m looking to track Selection object changes.

Advertisement

Answer

use onchange

I recommend using jQuery to avoid these cross browser issues, but that does not mean you should skip testing. see here.

Look at Rangy window.getSelection = rangy.getSelection

it might work…

JavaScript

Source : Web

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement