Skip to content

developer instructions

Raynos edited this page Dec 3, 2011 · 3 revisions

Compiling

To be able to build the "compiled" DOM-shim.js file in lib you will need a copy of node.js (I use 0.6.4 on windows). You will need to install local packages using npm install

node build.js

Should compile the parts of the DOM-shim in src/ into lib/DOM-shim.js. It will also compile the test-suites into the test.html file.

Running unit tests

After building the project the unit test should be in test/test.html. This should run all the tests defined in the test/test-suites folder.

Adding shims for interfaces.

Adding a shim for an interface involves adding a folder for the Interface if it doesn't exist in the interfaces folder. Then adding methods to the interface.

Note that interfaces should be split into all & ie8 depending on whether the code is neccessary in modern browsers or ie8.

Fixing browser bugs

Any browser bugs should (for now) be added to bugs.js. Here we do feature detection for the bug and then patch the DOM if it's broken (bugged).

RAYNOS Y U NO COMMENT

There are barely any comments in the code. Apart from comments in the bugs file explaining which browser is bugged and why (vaguely why). If anything needs proper commenting or something is clearly black magic raise an issue.