Creating Links with Mozilla's window.getSelection() Method

Friday October 25th, 2002

Kenneth Dillon writes: "This morning, IBM developerWorks published a tutorial detailing how Mozilla's cutting-edge ECMAScript and W3C DOM support and its nonstandard, but incredibly useful window.getSelection() method can be put to work to allow users to create links to virtually any piece of text within an HTML document."

Note that you must have a developerWorks profile to access this tutorial. You can create a free profile at the registration page.

#8 About window.getSelection()

by monokrom <>

Friday October 25th, 2002 6:03 PM

You are replying to this message

First : wow - a MozillaZine thread about the tutorial! Cool!

Second : window.getSelection() does not simply return the string of the selection. In fact, it returns a Selection object with its own methods and properties. Jeffrey M. Yates <a href="<…e_Object_Article.htm#hd20>">documented Mozilla's window.getSelection() and Selection objects</a> in March 2001 in his article <a href="<…_Range_Object_Article.htm>">"Using the W3C DOM Level 2 Range Object as Implemented by Mozilla"</a>.