Revision history for HTML::DOM
0.032 ???????
Incompatible change:
• An event_attr_handler that provides a subroutine ending
with a line like
defined $ret and !$ret and $event->preventDefault
will now end up triggering preventDefault in the case
of an undefined $ret. This is the result of the first
new feature:
New features:
• The event dispatch mechanism now distinguishes between
event listeners (added via addEventListener) and event han-
dlers (those assigned via attr_event_listener or one of the
on* methods), calling preventDefault as appropriate based
on the latter’s return value. To achieve this, we have made
get_event_listener return not the event handler itself, but
a closure that calls the event handler and checks its
return value.
• The closure returned by get_event_listener also checks
whether the handler is an object with a call_with method.
If it is, it calls it with the current event target as its
first argument and the event object as the second.
• insertAdjacentHTML and insertAdjacentElement
Bug fixes:
• HTML::DOM::Interface now exports the UTF16 constant.
• innerHTML no longer omits
before . (In fact, it
simply turns of TreeBuilder’s tag-omitting feature, which
has bugs in it.)
• as_text and as_HTML used not to pass arguments to the super-
class’s methods.
Other changes:
• attr_event_listener has been renamed to event_handler (the
original name was a big mistake). The old name is still
available but will be removed in a future release.
• Makefile.PL now lists Date::Format, which I forgot to
include in 0.030 (lastModified uses it). Thanks to Andreas
König for reporting this (RT #50273).
0.031 4 October, 2009
Bug fix: To conform to what ‘real’ web browsers do, a form’s
elements collection no longer includes image buttons. Thanks
to Steven Nikkel for reporting this problem.
0.030 17 September, 2009
New features:
• EventTarget’s attr_event_listener method
• The body element now delegates attribute event handlers
to the ownerDocument’s ‘event_parent’ if there is one.
(This makes the ‘onload’ in apply to
the window.)
• The init method of event objects now accepts target as
an argument.
• The same init method now returns the event object itself.
• The write and writeln methods now accept multiple arguments.
• lastModified
• Form’s encoding method
• A and area elements now have hash, host, etc. properties
that refer to parts of the linked URL.
Bug fixes:
• HTML::DOM’s title method no longer dies when the title ele-
ment is empty.
• EventTarget methods beginning with ‘on’ (like ‘onclick’)
used to return a hash ref of all non-capture handlers
assigned to the named event. (Assignment always worked.)
• Invalid method calls on any class inheriting from EventTar-
get used to have a scrambled error message.
• HTML::DOM::Interface now includes getComputedStyle.
0.029 28 August, 2009
Bug fixes:
• HTML::DOM::Element::Form’s elements method, when called in
list context, was ignoring the magic associations added in
the previous version. Thanks to Terry Simons once more, for
the bug report.
0.028 25 August, 2009
New features:
• Form elements are now associated during parsing with the
last-opened form element, even if it has been implicitly
closed. This is to deal with badly-formed documents that
contain aberrations like |