struct-dom-01-b

raster image of struct-dom-01-b

Verify the basic capability to handle the SVG DOM API. The test is composed of a top level svg element with an 'onload' event handler and a rect element. Both the svg and the rect elements have an identifier. The 'onload' handler invokes SVG-specific DOM API methods which use these identifiers.

First, the handler gets the SVG element owner of the rect element and checks it has the expected identifier. Then, the handler accesses the coordinates of the rect element and uses them to build a 'shadow' rectangle under the existing one. Finally, the 'shadow' rectangle is created using the SVGSVGElement's createSVGRect method.

If an implementation supports the ECMA Script DOM binding for SVG, then the image should show the following text: "This document's root identifier is: svg-root" and a red rectangle with a black shadow rectangle. Otherwise, only a red rectangle will show.

The rendered picture should match the reference image.