Crossfire 0.3a5 Migration

From FirebugWiki

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

Crossfire 0.3a5 Migration Guide

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

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


Now the event has the following changes:

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

New event form:

           "script": {

The values and kinds of the data and script objects 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