Factor out basic DOM adapter & rename geometry to pixelGeometry.