/doc/Bytex64.DOM.frag
$TITLE = 'Bytex64.DOM';

$CONTENT = <<'EOD';
<h2>Concepts</h2>

<p>The Bytex64.DOM library provides simple routines to create and
manipulate DOM elements.  In particular, it provides a quick element
creation function, and provides functions that shim "missing"
functionality in Internet Explorer.  Those who want to get started
should skip to the Class Variables section; the rest of this is a rant
against IE developers.

<p>Modern Internet Explorer has shaped up quite nicely.  In standards
mode, it supports CSS in a sane way that no longer requires box model
hacks.  Its DOM support is now quite good, except for one niggling
little bit: <a
href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/">DOM
Level 2 Events</a>.

<p>For some unfathomable reason, the IE devs have decided to stick with
their DHTML events API even though DOM L2 Events has been a W3C
Specification (i.e., not a draft or work-in-progress) since the turn of
the century.  Because of this continued incompatibility, web devs are
forced to work around it.  This module contains my workarounds, which
mimic the W3C API but internally call IE-specific event model functions
on IE.

<h2>Class Variables</h2>

<dd>
  <dt>Bytex64.DOM.version</dt>
  <dd>The version of the library, in case you want to check for a
  specific version</dd>
</dd>

<h2>Global Functions</h2>

<dl>
  <dt>Bytex64.DOM.qe(name, attrs)</dt>
  <dd>Creates a DOM element with the given name and attributes.
  <code>Attrs</code> is an object with key/value pairs for the object's
  attributes.</dd>

  <dt>Bytex64.DOM.addEventListener(elem, etype, func)</dt>
  <dd>Like the W3C DOM function of the same name, attaches an event
  listener for the event <code>etype</code> to the element
  <code>elem</code>.  <code>Func</code> is the function to run when the
  event fires.</dd>

  <dt>Bytex64.DOM.removeEventListener(elem, etype, func)</dt>
  <dd>The reverse of addEventListener; removes the given listener.</dd>

  <dt>Bytex64.DOM.preventDefault(e)</dt>
  <dd>Like the W3C DOM function of the same name, prevents the default
  action from occurring when the event is done processing.
  <code>E</code> is the event object currently being handled.  This can
  be used, for example, to prevent links from being followed after they
  are clicked.</dd>
</dl>

EOD