There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.

This may take a few seconds.



if-selection: "string";

This conditional action will return true if the window.getSelection() value equals the value of the specified string. Ie. it checks the contents of a string against whatever text is selected on the page, and return true if it matches, and false if it doesn't match.

Example use: We use this in the Element DevTools extension for determining which event declaration to run based on whether the person currently has any text selected in editable fields.

This is not a frequently used conditional command.