JavaScript Style Guide

When editing existing script you may have to modify these guidelines to harmonize with existing code, although you should consider reformatting the existing code if you are already making substantial changes.

Whitespace

Symbols

Code style

Function and variable naming

JavaScript features

XPConnect

DOM Elements