Created
October 12, 2014 14:56
-
-
Save moonlit-g/394abb62c3460363d0aa to your computer and use it in GitHub Desktop.
remove Array.toJSON (for Fx24)
This file contains 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
// | |
// prototype.jsがVer1.7未満だとArray→JSON変換で期待した結果にならないため | |
// 同ライブラリで定義されたArray.toJSON()を削除する。 | |
// (window.Arrayが拾えるかはFirefoxのバージョンによって異なるため、拾えてしまった場合のみ) | |
// (Fx24は拾えず、Fx29では拾えるのを確認) | |
// | |
( function() { | |
if( window.Array ) { | |
if( window.Array.prototype.toJSON ) { | |
delete window.Array.prototype.toJSON; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment