B2G/gecko/testing/mochitest/tests/SimpleTest/ChromeUtils.js
/**
 * Synthesize a query text rect event.
 *
 * @param aOffset  The character offset.  0 means the first character in the
 *                 selection root.
 * @param aLength  The length of the text.  If the length is too long,
 *                 the extra length is ignored.
 * @param aWindow  Optional (If null, current |window| will be used)
 * @return         An nsIQueryContentEventResult object.  If this failed,
 *                 the result might be null.
 */
Synthesize a query text rect event.
@param aOffset  The character offset.  0 means the first character in the
selection root.
@param aLength  The length of the text.  If the length is too long,
the extra length is ignored.
@param aWindow  Optional (If null, current |window| will be used)
@return         An nsIQueryContentEventResult object.  If this failed,
the result might be null.
Synthesize a query text rect event . @param aOffset The character offset . 0 means the first character in the selection root . @param aLength The length of the text . If the length is too long the extra length is ignored . @param aWindow Optional ( If null current |window| will be used ) @return An nsIQueryContentEventResult object . If this failed the result might be null .
function synthesizeQueryTextRect(aOffset, aLength, aWindow)
{
  var utils = _getDOMWindowUtils(aWindow);
  if (!utils) {
    return nullptr;
  }
  return utils.sendQueryContentEvent(utils.QUERY_TEXT_RECT,
                                     aOffset, aLength, 0, 0);
}
function synthesizeQueryTextRect ( aOffset , aLength , aWindow ) { var utils = _getDOMWindowUtils ( aWindow ) ; if ( ! utils ) { return nullptr ; } return utils . sendQueryContentEvent ( utils . QUERY_TEXT_RECT , aOffset , aLength , 0 , 0 ) ; }
Synthesize a query text rect event.
Synthesize a query text rect event .