BUFakeDom.js File Reference


Detailed Description

This is an implementation of most of the W3 DOM APIs.

It is intended for use in testing ECMAScript libraries outside of a browser environment.

This file is standalone, with no dependencies on other files.

As a side-effect of loading this file, the global variable "document" will become an instance of BUFakeDocument, if the variable "document" is not already defined.

Missing Functionality

The implementation is at least as complete as most browsers are today :) .

The main feature lacking is document.write() .

Here are the functions and attributes not yet implemented:

Caveats and Bugs

This implements a HTML-style DOM. In particular, node names are uppercased when returned by API functions, regardless of their letter case when created.

All methods that return a NodeList in the specification are implemented here to return an Array. These Arrays are not "live", unlike a DOM NodeList. They also do not support the item(number) interface.

Node.attributes is implemented as an object which is both an Array (with numerical index) and an associative array (with name index). It is "live". It does not implement item(number) or any of the other methods of NamedNodeMap.

Note that while Document.getEementsByName does return an Array, we do not implement support for duplicate uses of the same name.

We do not enforce that any member attributes are readonly.

We do not attempt to synchronize the values of aliased properties (for example, Element nodeName and tagName, or Attr nodeName and name).

Author:
Copyright 2003 Mark D. Anderson (mda@discerning.com)

Licensed under the Academic Free License 1.2 http://www.opensource.org/licenses/academic.php


Generated on Fri Sep 2 01:14:39 2005 for ../build/tooldoc/JsFakeDom/BUFakeDom by doxygen 1.3.4