refactor-864370: Remove uses of .done();

Replace with .then(null, console.error); to make this an easier landing
on central which has no .done();

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Fix nasty typo

Some automatic search and replace left us with an extra '

Signed-off-by: Joe Walker <jwalker@mozilla.com>
jsterm-911456: Better language/terminal separation

Accept that terminal has options rather than passing options around.
Have terminal pass the input state into the functions that work on that
rather than having them look the state up on the terminal.
Have terminal setup the monospace/proportional setting rather than the
language.
Finally have terminal maintain a last-used language so we can flip
between 2 languages.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Move copyProperties onto util

Identical function definitions were used in 2 places. There should
only be one.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Minor tweaks

Updated error messages, checks for things that should not happen, and
removal of code that isn't used and gets in the way as we make things
work in Firefox.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Fix domtemplate exports test bug

Clearly the type of a string isn't 'undefined'. Ever.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Allow test setup/shutdown to be async

This is important if you want to change language at the top of your
test (and change it back again afterwards)

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Remove output.duration

We're not using it, and have no plans to, so it should go.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
jsterm-911456: Create separate script eval system

This creates util.script.eval to basically do the same as the global
eval function, alongside:
* useTarget to set the global against which eval scripts are run
* onOutput to capture the results of console output and async exceptions

Signed-off-by: Joe Walker <jwalker@mozilla.com>
jsterm-911456: Further tweaks to the look and feel

Remove comments from the template. Whilst helpful they clog up the page
due to the number of times they are included.
Force the prompt and output spans to be contiguous so we don't have to
factor a (potentially variable width) space into our alignment issues.
Remove hover CSS as it's no longer needed.
Change shortcut prompt to a ':" for the command system.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
jsterm-911456: Exclude CSS for Firefox use

Trying to keep the same set of CSS rules between the browser and Firefox
is a good goal, but it just doesn't work. Sometimes we want it to look
different, sometimes Firefox doesn't define elements the same way (e.g.
pre) and sometimes there are different restrictions (e.g. font use). And
there is a different way of including files, so we're just going to
ignore CSS imports done the GCLI way, use an empty string and put the
CSS in conventional CSS places in Firefox.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Better error reporting

Event.add now checks that it is being passed a function and command
output now passes on errors rather than swallowing them.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
jsterm-911456: Add reporting of console output

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Rename field/basic.js to delegate.js

It only contained one field anyway.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Get rid of the __dlhjshfw hack

The requisition was exposed to the context in a deliberately obfuscated
way to prevent people from using it when we removed it. It is now
removed.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Refactor connections to unify xhr/websocket

Have a unified way to use xhr and websocket makes it much easier to add
new remote features, which we're going to need when we remote types.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
remotetype-928909: Add a remote type

This makes use of the simplified remoting in the previous changeset to
add remoted parse and stringify functions.
Some adjustments are needed to the handling of paramSpecs in canon to
insert an adjusted remote paramSpec for remoted types.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Various tweaks

Remove check for null context that is no longer needed in global.js
Add in the passed parameter to getBlank in array.js
Remove trailing , (the eclipse compressor cares about this)
Make the selection type give better error messages

Signed-off-by: Joe Walker <jwalker@mozilla.com>
jsterm-911456: Fixed height menu

With the hints being under the command line, we can't have the input
area jumping up and down as hints change so we make a fixed height hint
area.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
refactor-864370: Make highlighter mess with DOM less

It's not perfect, but it's a lot less mess-making than it was before.

Signed-off-by: Joe Walker <jwalker@mozilla.com>