unless otherwise specified, an event handler attribute must be set
to null.</p>
<p class=note>Some event handler attributes allow other values and
have other initial values, in particular the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> event handler
attribute on the <code><a href=#window>Window</a></code> object.</p>
<p>Event handler attributes are exposed in one or two ways.</p>
<p>The first way, common to all event handler attributes, is as an
<hr>
<p>All event handler attributes on an element, whether set to null
or to a <code><a href=#function>Function</a></code> object<!-- or to anything else, in the
case of 'onerror' -->, must be registered as event listeners on the
element, as if the <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
or to a <code><a href=#function>Function</a></code> object, must be registered as event
listeners on the element, as if the <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
method on the <code>Element</code> object's <code>EventTarget</code>
interface had been invoked when the event handler attribute's
element or object was created, with the event type (<var title=dom-event-type>type</var> argument) equal to the type
<p>Must be invoked whenever an <code title=event-error><a href=#event-error>error</a></code> event is targeted at or bubbles
through the object.</p>
<p>Unlike other event handler attributes, the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> event handler attribute can
have any value. The initial value of <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> must be