JavaScriptReviewNotes

Not logged in - Log In / Register

JavaScript Review Notes

These are items that any code reviewer should keep in mind when reviewing JavaScript.

CRITICAL

Building

To build the javascript run:

make jsbuild

More info: JavaScript Build System

Plain Old JavaScript

XHTML, CSS, and Styling

Event Handling

Javascript Module formatting

Naming Javascript Modules and Namespaces

Widgets and Plugins

Tests

Footnotes

[1] It looks like literal regexps confuse it, but OTOH, we recommend against using them.
Wrong, XmlLint rightly complains there is an unescaped less-than (<) in a document. Use != 0 or != 1 if you must embed script, but the right thing to do is to extract the script to a separate file.

== XmlLint notices ==

lib/lp/registry/templates/product-new.pt
    110: parser error : StartTag: invalid element name
    if (steps.search(/hidesearch/) < 0) {
    ^

[2] For example, if you want to toggle an element's visibility using POJS, use our unseen class:

    // Make this element invisible.
    element1.addClass('unseen');
    // Make this element visible again.
    element2.removeClass('unseen');


CategoryJavaScript CategoryJavaScript

JavaScriptReviewNotes (last edited 2014-11-30 20:26:24 by blr)