interact-events-01-b

raster image of interact-events-01-b

Test 'onload' event attribute.

Six blue rectangles have been defined, each initially defined with 'visibility:hidden'. 'onload' event attributes are assigned in a variety of ways, usually to set 'visibility:visible'. The red text indicates the correct behavior (whether a given rectangle should appear in the visual result).

The first rectangle has no associated 'onload' event so it remains invisible. The second rectangle has an 'onload' event on itself, which invokes a script which sets 'visibility:visible', so it should appear. The third rectangle has an 'onload' event on its parent 'g', which invokes a script which sets 'visibility:visible' on the rectangle, so it should appear. The fourth rectangle has an 'onload' event on an ancestor 'svg', which invokes a script which sets 'visibility:visible' on the rectangle, so it should appear. The fifth rectangle has an 'onload' event both itself and its parent 'g'. The rectangle's script sets 'visibility:visible' on the rectangle but the parent's script sets 'visibility:hidden' on the rectangle, which should happen afterwards, so the rectangle should not appear. The sixth rectangle has an 'onload' event on the outermost 'svg', which invokes a script which sets 'visibility:visible' on the rectangle, so it should appear.