Bug 834160 - Part 1/N: interface changes.
Bug 834160 - Part 2/N: fix dom implementations