Instruction set reference
HIPE_OP_GET_SELECTION
Gets the current user-selected text in the document (if the user has selected any content) and requests the server to send back a HIPE_OP_CONTENT_RETURN instruction. The server sends back an instruction even if there is no selection: in this case a blank string is sent in the reply instruction.
- location: Not used. This instruction applies to the whole document.
- arg[0]: Pass "0" here (or leave empty) to request the contents of the selection in the client's own frame. Pass "1" from a top-level frame to request the global selection; meaning that the selected text is returned even if it is within a child frame of the requesting client.
Notes
If a client that does not occupy a top-level frame attempts to ask for the global selection, a blank selection "" is always returned. This is a security feature to prevent clients from snooping on other client frames.