Revision history for HTML::DOM
0.010 23 December, 2007
New features:
• HTML::DOM::Node’s trigger_event method now returns nothing.
(It used to return the return value of the default event
handler.) As a side effect, this fixes a few bugs.
• The classes for HTML tables and frames have been added.
• HTML::DOM::Element now has a content_offset method.
• HTML::DOM::Element::Form now has its reset method.
• The DOM Level-2 core interfaces are now supported.
• I’ve started work on CSS features. So far, elements have a
‘style’ method.
• You can now access forms by using an HTML::DOM object as
a hash ref.
• A checkbox’s click method now toggles the checkbox’s state.
Fixed bugs:
• HTML::DOM::Element::Form’s submit method now
returns nothing.
• HTML::DOM::Element::Select’s blur and focus methods now
return nothing.
• HTML::DOM::Element::Button’s type method now works.
• HTML::DOM::Element::Label’s htmlFor method now works.
• Heading elements (h1..h6) are now blessed into the
HTML::DOM::Element::Heading class, so the align
method works.
• HTML::DOM::Element::Object’s useMap method now works.
• HTML::DOM::Element::Applet’s codeBase method now works.
• tbody elements are now inserted into the tree if a <tr>
occurs directly within a <table>.
• HTML::DOM::Interface now includes HTML::DOM::TreeBuilder,
which is used for the document’s <html> element while the
HTML code is being parsed.
• The as_text and as_HTML methods now work on the document’s
<html> element during parsing.
• The <html> element’s ‘version’ method now works dur-
ing parsing.
• getElementById and getElementsByTagName now stringify the
name or ID (in order to make HTML::Element’s look_down
method happy). These both used to return false negatives
when passed objects with string overloading.
• HTML::DOM::Element’s normalize method (which has been moved
to HTML::DOM::Node) now actually does something.
• HTML::DOM::Node’s cloneNode method used not to erase the
clone’s parentNode attribute unless the cloning was deep.
Nor did it erase the list of child nodes in a shallow clone,
so those nodes would have multiple parents.
• cloneNode now works with HTML elements (the attributes are
now cloned).
• HTML::DOM::CharacterData’s deleteData16 method now works
properly, instead of getting offsets wrong and then convert-
ing all the text into UTF-16.
• HTML::DOM::Collection’s namedItem method used to return
undef for form, img and map elements.
• HTML::DOM::Collection::Elements’s namedItem method used to
die if there were multiple form fields with the same name.
0.009 23 November, 2007
Changes/new features:
* You can do something with errors produced by event handlers
by passing a coderef to the new event_handler method. That
coderef will be called for each error. (Before, such errors
were ignored.)
* HTML::DOM::Interface has been modified, such that
'Document' is no longer a separate interface--since there is
no corresponding HTML::DOM module--, but all its members
are now under HTMLDocument, which inherits directly from
Node. Likewise, 'Element' has been merged into HTMLElement.
* HTML::DOM::Element::Select now has 'add' and
'remove' methods.
* 'Select' elements can now be used as array refs, so you can
write $select->[0] instead of $select->options->[0].
* You can now assign undef to such an array element to delete
it, so '$select->[0] = undef' does the same thing as
'shift @$select'. 'delete $select->[0]' also works.
Bug fixes:
* $form->action now works when the document has no base url
(used to die)
* HTML::DOM::Element::Select's type method now works.
* HTML::DOM::Element::Select's selectedIndex method and
HTML::DOM::Element::Option's selected method should work
reliably now.
* HTML::DOM::Collection::Options is now listed by
HTML::DOM::Interface.
* HTML::DOM::Element::Input's click method now returns an
empty list.
* HTML::DOM's event_attr_handler is now actually useful. (It
used to be ignored most of the time.)
0.008 5 October, 2007
* New HTML::DOM::Interface module
* Added type and value methods to HTML::DOM::Element::Button
* Added the charset, coords and tabIndex methods to
HTML::DOM::Element::A.
* HTML::DOM's createElement method now throws an
HTML::DOM::Exception.
0.007 29 September, 2007
Two bug fixes:
* The URL method no longer warns if there is no URL.
* The previous release broke parsing of forms. (The rest of
the document would be within the form element.) Now it
should work.
0.006 27 September, 2007
- The following interfaces have been implemented:
HTMLFormElement
HTMLSelectElement
HTMLOptGroupElement
HTMLOptionElement
HTMLInputElement
HTMLTextAreaElement
HTMLButtonElement
HTMLLabelElement
HTMLFieldSetElement
HTMLLegendElement
HTMLUListElement
HTMLOListElement
HTMLDListElement
HTMLDirectoryElement
HTMLMenuElement
HTMLLIElement
HTMLDivElement
HTMLParagraphElement
HTMLHeadingElement
HTMLQuoteElement
HTMLPreElement
HTMLBRElement
HTMLBaseFontElement
HTMLFontElement
HTMLHRElement
HTMLModElement
HTMLAnchorElement
HTMLImageElement
HTMLObjectElement
HTMLParamElement
HTMLAppletElement
HTMLMapElement
HTMLAreaElement
HTMLScriptElement
- Some methods have also been added for compatibility with
WWW::Mechanize.
- The 'open' method no longer stops the ownerDocument method
from working properly.
- Furthermore, 'open' is no longer anywhere near as powerful as
it was; it used to obliterate the coderefs that were passed to
event_attr_handler and default_event_handler.
- &HTML::DOM::base has been added.
- The parse and eof methods have been deleted, since write and
close do the same thing.
0.005 26 August, 2007
The HTMLCollection interface has now been implemented, and so
have the attribute methods of the HTMLDocument interface
(Level 1). The HTMLHtmlElement, HTMLHeadElement,
HTMLLinkElement, HTMLTitleElement, HTMLMetaElement,
HTMLBaseElement, HTMLIsIndexElement, HTMLStyleElement and
HTMLBodyElement interfaces (again, Level 1) have also been
implemented.
0.004 22 July, 2007
Fixed infinite recursion triggered by element handlers calling
$dom_tree->write($html) when $html contains elements handled
by the same handler. E.g.,
<script>document.write('<script>...<\/script>')</script>
0.003 15 July, 2007
- HTML::DOM::Text now has its nodeValue method, which I forgot
about before. (Actually, I moved HTML::DOM::Comment's
nodeValue to HTML::DOM::CharacterData.)
- as_text and as_HTML have been overridden and now work.
0.002 9 July, 2007
The basic mechanism for event handling has been implemented.
The various different flavours of event objects still need
to be added.
0.001 27 June, 2007
The first version. So far, most of the level-1 core DOM is
implemented, and a couple of HTML-specific methods, but
that's all.