Created
November 5, 2009 01:56
-
-
Save phiggins42/226632 to your computer and use it in GitHub Desktop.
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
// d.global == window, d.doc == document | |
// dojo.selection function defition (one-time cost to determine): | |
var _selection = "getSelection", | |
selection = d.global[_selection] || d.doc[_selection] || function(){ | |
return d.doc.selection.createRange().text || ""; | |
} | |
; | |
// namespace-polluting functions: | |
d[_selection] = function(){ return selection() + ""; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment