JavaScript Development

Inheritance Model

All code contributed to Echo should use the CoreJS inheritance model when creating instantiable objects. See the CoreJS Developer's Guide for more information.

Documenting JavaScript

All Echo JavaScript code must be documented using "doc comments". These comments are processed by the CoreDoc Documentation Tool. In addition to the standard tags specified available to CoreDoc, several additional documentation tags are used:

  • @sp ({type}) propertyName description: provides a description of a style property (a property which may be set in the component, style, and/or stylesheet).
  • @cp ({type}) propertyName description: provides a description of a component property (a property which may be only set on the component, and not style and/or stylesheet).
  • @ldp ({type}) propertyName description: provides a description of a layout data property which may be set in child component layout data information.

Error Checking / Linting

All contributed code should be run through the JSLint JavaScript Verification Tool. The "Assume a Browser" and "Tolerate unfiltered for in" features may be enabled. The namespaces "Core", "Echo", and "Extras" should be predefined.

Warnings related to the use of == null and != null conditionals may be ignored, provided there is specific reason that the conditional should not use the === or !== operators instead, i.e., the code truly needs to determine if an expression evaluates to null or undefined.