Features and Tests

mattbasta edited this page Jul 6, 2011 · 5 revisions

There are many tests that take place during the validation process. Each exists in a tier, which groups similar tests together. Similar tests are defined as tests which generate errors of similar priority and type.


Tier 1

Tier 2

Tier 3

  • Regex tests (pattern matching)
  • Basic syntax and reference checking

The validator prevents:

  • Modification of variables declared as const
  • Modification of global variables and entities
  • Modification of main type prototypes (Array.prototype, Object.prototype, etc.)
  • Access to banned entities and functions (eval, Function, etc.)
  • setAttribute to modify event handlers
  • innerHTML to set event handlers
  • innerHTML to generate banned markup
  • innerHTML to execute malicious scripts
  • Use of createElement and createElementNS to create script tags
  • Synchronous use of XMLHttpRequest

Tier 4

Tier 5

While the validator treats tier 5 as standard tier, it is in many ways a "virtual" tier. Messages for this tier are generated during tiers 1-4, however, these messages may be discarded if determined mode is not enabled and a failure occurs before tier 5 is run.

  • Compatibility tests
    • Firefox 5 compatibility
    • Firefox 6 compatibility
    • Firefox 7 compatibility