javascript - Store & Restore Highlighted Selection -
i writing chrome extention need store , restore user's highlighted selection. stored information stored on server. wondering how this?
i looked using range, unsure if right way since example below worked in firefox.
i found example works in firefox :(
i think technique on page work in chrome: there's no reason why shouldn't. when save selection , reload, see selection restore , disappear, suspect in page (possibly ads) destroying selection somehow.
if can't work, try serializer module of rangy library, although it's overkill chrome.
in general, using browser's selection
, range
apis way go. standardized , universally supported (with quirks , bugs, naturally) in current browsers.
Comments
Post a Comment