Changes for version 0.003
- The DOM plugin: • Event attribute handlers now receive URL and line number info. • On a page that has no Content-Script-Type header, a script element with no language specified no longer causes warnings. • It used to be that, if multiple script elements or event attributes used the same handler, and that handler was passed to the plugin with a regexp to select it (as opposed to 'default'), only every other script/event would be trig- gered (forgot to clear a couple of hash iterators). This has been fixed. • $mech->content now returns the content in the encoding of the page itself, rather than the encoding of the first page encountered. The JavaScript plugin: • The engine method (experimental and undocumented--read the source) has been added. • clear_timeouts now actually works properly. It used to run the code for each timeout only if the specified time had *not* elapsed. • Line numbers for event attributes are now passed to the back end’s event2sub method. JE back end: • Read-only properties are now marked as such in the JS envi- ronment (which prevents the setting of a property if a pro- totype has a read-only property of the same name --the only difference it makes) and now have their types (string, num- ber, etc.) set properly. • Class bindings now use JE’s ‘unwrap’ feature, so version 0.022 is now required. • event2sub now supports line numbers.
Changes for version 0.003
- The JavaScript plugin: • Updated to work with HTML::DOM 0.032’s new event handler model. This fixes various bugs involving event handler prop- erties (‘theForm.onsubmit’). • Calling WWW::Scripter’s eval method would run the Java- Script code always in the main window, if when called from the WWW::Scripter object corresponding to a frame. This has been fixed. This is part of the solution to the frames prob- lem mentioned below. JE back end (0.004): • We now support those utterly useless HTML-generating meth- ods of string objects that have been part of JavaScript since the very beginning, and which have been added solely for completeness’ sake. • We now override JE’s exists method, so that collection prop- erties of the window object appear in scope and can be seen by hasOwnProperty. • Likewise updated to work with the new event handler model. • The scope of an event handler now includes the docu- ment object. • For those cases where HTML::DOM provides UTF-16 methods in addition to the usual ones, JavaScript now uses the UTF-16 versions. (This makes textNode.data.length equivalent to textNode.length.) • It used to be that frames with no scripts in them that were accessed by JavaScript code in the main window would share the global object with the main window. Also, window objects, if referenced by JavaScript variables in another frame, would continue to refer to the same global object when the frame was navigated. This mess has been mostly cleaned up. There are a few rough edges that will be ironed out in a future release.
- 0.002c 27 August, 2009 JE back end (0.003): • This release simply fixes a test to check for JE 0.035 instead of JE 0.034 before deciding not to skip a test. (The version has been changed as the module’s docs have changed.)
- 0.002b 25 August, 2009 JE back end: • It now turns on JE’s HTML mode (to support HTML comments embedded in JavaScript). Version 0.034 of JE is required for this feature to work.
- 0.002a 16 August, 2009 HTML::DOM 0.027 and WWW::Scripter 0.004 are now required. A bug fix in JE 0.033 causes the tests to trigger bugs in previ- ous versions of those two modules.
Modules
JavaScript plugin for WWW::Scripter
JE backend for WSPJS
Provides
in lib/WWW/Scripter/Plugin/JavaScript/JE.pm