Firefox で JavaScript の document.getSelection()
2011-12-24 14:50
久々に更新。Firefox 8.0 あたりから、JavaScript の document.getSelection() の挙動が変わったようでエラーが発生。
これまでは document.getSelection() では string が返ってきたのが、Selection オブジェクトが返るようになっていた。
そのため、文字列を取得するためには document.getSelection().toString() のように書き換える必要がある。
もっとも、これまでは window.getSelection() では Selection オブジェクトが、 document.getSelection() では文字列が返ってきていて変な仕様でしたが、この仕様変更できれいな形にはなったと思います。
コメントはまだありません
No comments yet.
Sorry, the comment form is closed at this time.