Crossfire 0.3a5 Migration

From FirebugWiki

Revision as of 16:47, 14 March 2011 by Mrennie (Talk | contribs)
Jump to: navigation, search

During 0.3a5 development there was a lot of work done to make the protocol more consistent and coherent, as expected, this work brought with it many changes to the protocol and a few changes that are no longer compatible with existing versions of Crossfire.

This guide will help ease the transition from using a pre-0.3a5 version of Crossfire, with each affected protocol entity described in its own following section.


The onScript event has been updated to return attributes with consistent names and the meta-data about the script that was loaded.

The related work item is: Issue 3476

Action Required

The following changes require clients to discontinue using two removed attributes; href and context_href and begin using the new script object.


In the pre-0.3a5 versions of Crossfire the onScript event had the following form:


The following has changed:

  • the body object no longer contains an href or context_href entry
  • the body object now contains the script meta-data object, identical to what is returned via a script request with no included source.

New event form:

           "script": {

The values and kinds of the script object are as follows:

id a String identifier for the script - never null
lineOffset a Number representing the line offset of the script - never less than 0
columnOffset a Number representing the column offset of the script - never less than 0
sourceStart a String representing the first line of source in the script - never null
sourceLength a Number representing the entire length of the source of the script - never less than 0
lineCount a Number representing the total number of lines of source in the script - never less than 0
compilationType a String describing the kind of the script - see sourceFile.js for complete listing of types
Personal tools