Full version, Basic version

Specification link: 16.2 Complete list of supported events

interact-dom-01-b ← index → interact-order-01-b

# interact-events-01-b
SVG Image | PNG Image

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.

interact-dom-01-b ← index → interact-order-01-b

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License.
To contribute to a W3C Test Suite, see the policies and contribution forms.