Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion javascript toolbar shows function code in 1 line

Path: g2news1.google.com!postnews.google.com!h17g2000vbz.googlegroups.com!not-for-mail
From: ejv <enricj...@yahoo.es>
Newsgroups: mozilla.addons.chromebug
Subject: javascript toolbar shows function code in 1 line
Date: Mon, 29 Aug 2011 04:51:24 -0700 (PDT)
Organization: http://groups.google.com
Lines: 37
Message-ID: <1ab4b19f-e1ee-43d0-964e-fed409d62275@h17g2000vbz.googlegroups.com>
NNTP-Posting-Host: 88.2.161.86
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1314618798 18141 127.0.0.1 (29 Aug 2011 11:53:18 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 29 Aug 2011 11:53:18 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: h17g2000vbz.googlegroups.com; posting-host=88.2.161.86; posting-account=B4Pp7QoAAADSI-H53kIA7gsC-Y9CfEqv
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like
 Gecko) Chrome/12.0.742.122 Safari/534.30,gzip(gfe)

I don't kow why the script toolbar shows functions well formatted and
others unformatted (inlined). This means I can't debug the unformatted
functions.

For example, in the following extract of the same JS file, the
Selenium constructor appears well formatted, but the
decorateFunctionWithTimeout function is inlined.

Anyone knows the reason?


function Selenium(browserbot) {
this.browserbot = browserbot;
this.optionLocatorFactory = new OptionLocatorFactory;
this.page = function () {return browserbot;};
this.defaultTimeout = Selenium.DEFAULT_TIMEOUT;
this.mouseSpeed = Selenium.DEFAULT_MOUSE_SPEED;
if (bot && bot.locators && bot.locators.add) {
bot.locators.add("xpath", {single: function (target, opt_root) {return
browserbot.locateElementByXPath(target, opt_root);}, many: function
(target, opt_root) {return browserbot.locateElementsByXPath(target,
opt_root);}});
bot.locators.add("css", {single: function (target, opt_root) {return
browserbot.locateElementByCss(target, opt_root);}, many: function
(target, opt_root) {return eval_css(target, opt_root);}});
}
}
Selenium.DEFAULT_TIMEOUT = 30000;
Selenium.DEFAULT_MOUSE_SPEED = 10;
Selenium.RIGHT_MOUSE_CLICK = 2;
Selenium.decorateFunctionWithTimeout = function (f, timeout, callback)
{if (f == null) {return null;}var timeoutTime =
getTimeoutTime(timeout);return function () {if ((new Date).getTime() >
timeoutTime) {if (callback != null) {callback();}throw new
SeleniumError("Timed out aftmr " + timeout + "ms");}return f();};};