1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
7 <meta name=
"generator" content=
"Docutils 0.4: http://docutils.sourceforge.net/" />
10 <link rel=
"stylesheet" href=
"../../../include/css/documentation.css" type=
"text/css" />
11 <script type=
"text/javascript" src=
"../../../packed/MochiKit/MochiKit.js"></script>
12 <script type=
"text/javascript" src=
"../../js/toc.js"></script>
15 <div class=
"document">
16 <p>2006-XX-XX v1.4
</p>
18 <li>MochiKit.Color's HSV to RGB conversion code fixed to return the correct
19 value (hsv.v for RGB values) in cases where saturation ===
0.
</li>
20 <li>doXHR workaround for a Mozilla bug when calling XMLHttpRequest in certain
21 situations. Always wraps call in a callLater(
0, doXHR, url, opts).
</li>
22 <li>parseQueryString will now parse values with embedded
"=
"</li>
23 <li>Workaround for a Safari DOM crash when using MochiKit.Iter.list.
24 <a class=
"reference" href=
"http://bugs.webkit.org/show_bug.cgi?id=12191">http://bugs.webkit.org/show_bug.cgi?id=
12191</a></li>
25 <li>New removeNodeAttribute function in MochiKit.DOM.
</li>
26 <li>MochiKit.Async.doXHR and dependent functions now accept
201 CREATED and
27 204 NO CONTENT as valid.
</li>
28 <li>MochiKit.DOM.formContents now treats option tags the same way that
29 form posts do in the case of missing and empty string value attributes,
31 <li>MochiKit.Base.queryString now accepts third queryString([names, values])
33 <li>MochiKit.DOM.formContents now defaults to document.body if no element is
35 <li>New MochiKit.Selector module
</li>
36 <li>MochiKit.LoggingPane fixes for Internet Explorer
</li>
37 <li>MochiKit.DOM now creates XHTML nodes in XUL documents.
</li>
38 <li>MochiKit.LoggingPane now works on pages with '#' in the URL on IE
</li>
39 <li>New MochiKit.Async.doXHR as a convenient method for doing custom
40 XMLHttpRequests (e.g. extra headers, overrideMimeType, etc.)
</li>
41 <li>New __connect__ protocol for MochiKit.Signal.connect source notifications
</li>
42 <li>Added colSpan, bgColor to the list of DOM renames for Internet Explorer
</li>
43 <li>New MochiKit.Signal.disconnectAllTo function
</li>
44 <li>MochiKit.Base.parseQueryString now accepts leading question mark
</li>
45 <li>New MochiKit.Base.values function
</li>
46 <li>Fixed MochiKit.Signal.disconnect when called from a signal handler invoked
47 by MochiKit.Signal.signal
</li>
48 <li>parseQueryString now splits on HTML entities equivalent to ampersand as well
</li>
49 <li>Better XHTML compatibility (removed obvious cases where uppercase tagName or
50 nodeName was assumed)
</li>
51 <li>MochiKit.Base.queryString now handles array values in the same way HTML
52 forms handle multiple elements of the same name.
</li>
53 <li>MochiKit.Base.parseQueryString now returns {} for empty query string instead
54 of {
"":
"undefined
"}
</li>
55 <li>MochiKit.DOM.formContents now handles option value=
"" correctly.
</li>
56 <li>MochiKit.DOM now checks for undefined className.
</li>
57 <li>MochiKit.Iter.groupby() now uses compare() to group rather than == and !=
</li>
58 <li>serializeJSON no longer serializes undefined, as per the JSON spec
</li>
59 <li>Fixed an infinite recursion bug in serializeJSON if an adapter
60 returns the object itself.
</li>
61 <li>New MochiKit.Base.operator.seq and sne to support strict comparison
</li>
62 <li>MochiKit.Base.isArrayLike no longer returns true for DOM text nodes
</li>
63 <li>Added readonly-readOnly to the list of DOM renames for Internet Explorer
</li>
64 <li>New MochiKit.Signal event method: confirmUnload (sets returnValue for
66 <li>Fix interpreter help() function for Firefox and IE
</li>
67 <li>API version compatibility notes added
</li>
68 <li>New MochiKit.Base functions methodcaller and compose
</li>
69 <li>Support IE-based native console logging (Debugger, Atlas)
</li>
70 <li>Refactored style functions from MochiKit.DOM to MochiKit.Style
</li>
71 <li>MochiKit.Async.DeferredList is now a proper Deferred
</li>
72 <li>MochiKit.DOM.formContents now supports SELECT multiple tags
</li>
73 <li>Re-use StopIteration Error if the browser already has it
</li>
74 <li>Workaround IE type=
"" bug for INPUT elements
</li>
75 <li>Allow LoggingPane to work in IE with hyphen-containing URLs
</li>
76 <li>Replace percents for Safari native logging to avoid crashing
</li>
77 <li>New MochiKit.DOM.coerceToDOM .dom(node) / .__dom__(node) protocol
</li>
78 <li>MochiKit.DOM's MochiKit.Iter dependency is now optional
</li>
79 <li>Added expand all link to the documentation index
</li>
80 <li>Added MochiKit.DOM.isChildNode
</li>
81 <li>Added synthesizing for onmouseenter/onmouseleave
</li>
83 <p>2006-
04-
29 v1.3
.1 (bug fix release)
</p>
85 <li>Fix sendXMLHttpRequest sendContent regression
</li>
86 <li>Internet Explorer fix in MochiKit.Logging (printfire exception)
</li>
87 <li>Internet Explorer XMLHttpRequest object leak fixed in MochiKit.Async
</li>
89 <p>2006-
04-
26 v1.3
"warp zone
"</p>
91 <li>IMPORTANT: Renamed MochiKit.Base.forward to forwardCall (for export)
</li>
92 <li>IMPORTANT: Renamed MochiKit.Base.find to findValue (for export)
</li>
93 <li>New MochiKit.Base.method as a convenience form of bind that takes the
94 object before the method
</li>
95 <li>New MochiKit.Base.flattenArguments for flattening a list of arguments to
97 <li>Refactored MochiRegExp example to use MochiKit.Signal
</li>
98 <li>New key_events example demonstrating use of MochiKit.Signal's key handling
100 <li>MochiKit.DOM.createDOM API change for convenience: if attrs is a string,
101 null is used and the string will be considered the first node. This
102 allows for the more natural P(
"foo
") rather than P(null,
"foo
").
</li>
103 <li>MochiKit Interpreter example refactored to use MochiKit.Signal and now
104 provides multi-line input and a help() function to get MochiKit function
105 signature from the documentation.
</li>
106 <li>Native Console Logging for the default MochiKit.Logging logger
</li>
107 <li>New MochiKit.Async.DeferredList, gatherResults, maybeDeferred
</li>
108 <li>New MochiKit.Signal example: draggable
</li>
109 <li>Added sanity checking to Deferred to ensure that errors happen when chaining
110 is used incorrectly
</li>
111 <li>Opera sendXMLHttpRequest fix (sends empty string instead of null by default)
</li>
112 <li>Fix a bug in MochiKit.Color that incorrectly generated hex colors for
113 component values smaller than
16/
255.
</li>
114 <li>Fix a bug in MochiKit.Logging that prevented logs from being capped at a
116 <li>MochiKit.Async.Deferred will now wrap thrown objects that are not instanceof
117 Error, so that the errback chain is used instead of the callback chain.
</li>
118 <li>MochiKit.DOM.appendChildNodes and associated functions now append iterables
119 in the correct order.
</li>
120 <li>New MochiKit-based SimpleTest test runner as a replacement for Test.Simple
</li>
121 <li>MochiKit.Base.isNull no longer matches undefined
</li>
122 <li>example doctypes changed to HTML4
</li>
123 <li>isDateLike no longer throws error on null
</li>
124 <li>New MochiKit.Signal module, modeled after the slot/signal mechanism in Qt
</li>
125 <li>updated elementDimensions to calculate width from offsetWidth instead
127 <li>formContents now works with FORM tags that have a name attribute
</li>
128 <li>Documentation now uses MochiKit to generate a function index
</li>
130 <p>2006-
01-
26 v1.2
"the ocho
"</p>
132 <li>Fixed MochiKit.Color.Color.lighterColorWithLevel
</li>
133 <li>Added new MochiKit.Base.findIdentical function to find the index of an
134 element in an Array-like object. Uses === for identity comparison.
</li>
135 <li>Added new MochiKit.Base.find function to find the index of an element in
136 an Array-like object. Uses compare for rich comparison.
</li>
137 <li>MochiKit.Base.bind will accept a string for func, which will be immediately
138 looked up as self[func].
</li>
139 <li>MochiKit.DOM.formContents no longer skips empty form elements for Zope
141 <li>MochiKit.Iter.forEach will now catch StopIteration to break
</li>
142 <li>New MochiKit.DOM.elementDimensions(element) for determining the width and
143 height of an element in the document
</li>
144 <li>MochiKit.DOM's initialization is now compatible with
145 HTMLUnit + JWebUnit + Rhino
</li>
146 <li>MochiKit.LoggingPane will now re-use a
<tt class=
"docutils literal"><span class=
"pre">_MochiKit_LoggingPane
</span></tt> DIV element
147 currently in the document instead of always creating one.
</li>
148 <li>MochiKit.Base now has operator.mul
</li>
149 <li>MochiKit.DOM.formContents correctly handles unchecked checkboxes that have
150 a custom value attribute
</li>
151 <li>Added new MochiKit.Color constructors fromComputedStyle and fromText
</li>
152 <li>MochiKit.DOM.setNodeAttribute should work now
</li>
153 <li>MochiKit.DOM now has a workaround for an IE bug when setting the style
154 property to a string
</li>
155 <li>MochiKit.DOM.createDOM now has workarounds for IE bugs when setting the
156 name and for properties
</li>
157 <li>MochiKit.DOM.scrapeText now walks the DOM tree in-order
</li>
158 <li>MochiKit.LoggingPane now sanitizes the window name to work around IE bug
</li>
159 <li>MochiKit.DOM now translates usemap to useMap to work around IE bug
</li>
160 <li>MochiKit.Logging is now resistant to Prototype's dumb Object.prototype hacks
</li>
161 <li>Added new MochiKit.DOM documentation on element visibility
</li>
162 <li>New MochiKit.DOM.elementPosition(element[, relativeTo={x:
0, y:
0}])
163 for determining the position of an element in the document
</li>
164 <li>Added new MochiKit.DOM createDOMFunc aliases: CANVAS, STRONG
</li>
166 <p>2005-
11-
14 v1.1
</p>
168 <li>Fixed a bug in numberFormatter with large numbers
</li>
169 <li>Massively overhauled documentation
</li>
170 <li>Fast-path for primitives in MochiKit.Base.compare
</li>
171 <li>New groupby and groupby_as_array in MochiKit.Iter
</li>
172 <li>Added iterator factory adapter for objects that implement iterateNext()
</li>
173 <li>Fixed isoTimestamp to handle timestamps with time zone correctly
</li>
174 <li>Added new MochiKit.DOM createDOMFunc aliases: SELECT, OPTION, OPTGROUP,
175 LEGEND, FIELDSET
</li>
176 <li>New MochiKit.DOM formContents and enhancement to queryString to support it
</li>
177 <li>Updated view_source example to use dp.SyntaxHighlighter
1.3.0</li>
178 <li>MochiKit.LoggingPane now uses named windows based on the URL so that
179 a given URL will get the same LoggingPane window after a reload
180 (at the same position, etc.)
</li>
181 <li>MochiKit.DOM now has currentWindow() and currentDocument() context
182 variables that are set with withWindow() and withDocument(). These
183 context variables affect all MochiKit.DOM functionality (getElement,
184 createDOM, etc.)
</li>
185 <li>MochiKit.Base.items will now catch and ignore exceptions for properties
186 that are enumerable but not accessible (e.g. permission denied)
</li>
187 <li>MochiKit.Async.Deferred's addCallback/addErrback/addBoth
188 now accept additional arguments that are used to create a partially
189 applied function. This differs from Twisted in that the callback/errback
190 result becomes the
<em>last
</em> argument, not the first when this feature
192 <li>MochiKit.Async's doSimpleXMLHttpRequest will now accept additional
193 arguments which are used to create a GET query string
</li>
194 <li>Did some refactoring to reduce the footprint of MochiKit by a few
196 <li>escapeHTML to longer escapes ' (apos) and now uses
197 String.replace instead of iterating over every char.
</li>
198 <li>Added DeferredLock to Async
</li>
199 <li>Renamed getElementsComputedStyle to computedStyle and moved
200 it from MochiKit.Visual to MochiKit.DOM
</li>
201 <li>Moved all color support out of MochiKit.Visual and into MochiKit.Color
</li>
202 <li>Fixed range() to accept a negative step
</li>
203 <li>New alias to MochiKit.swapDOM called removeElement
</li>
204 <li>New MochiKit.DOM.setNodeAttribute(node, attr, value) which sets
205 an attribute on a node without raising, roughly equivalent to:
206 updateNodeAttributes(node, {attr: value})
</li>
207 <li>New MochiKit.DOM.getNodeAttribute(node, attr) which gets the value of
208 a node's attribute or returns null without raising
</li>
209 <li>Fixed a potential IE memory leak if using MochiKit.DOM.addToCallStack
210 directly (addLoadEvent did not leak, since it clears the handler)
</li>
212 <p>2005-
10-
24 v1.0
</p>
214 <li>New interpreter example that shows usage of MochiKit.DOM to make
215 an interactive JavaScript interpreter
</li>
216 <li>New MochiKit.LoggingPane for use with the MochiKit.Logging
217 debuggingBookmarklet, with logging_pane example to show its usage
</li>
218 <li>New mochiregexp example that demonstrates MochiKit.DOM and MochiKit.Async
219 in order to provide a live regular expression matching tool
</li>
220 <li>Added advanced number formatting capabilities to MochiKit.Format:
221 numberFormatter(pattern, placeholder=
"", locale=
"default
") and
222 formatLocale(locale=
"default
")
</li>
223 <li>Added updatetree(self, obj[, ...]) to MochiKit.Base, and changed
224 MochiKit.DOM's updateNodeAttributes(node, attrs) to use it when appropiate.
</li>
225 <li>Added new MochiKit.DOM createDOMFunc aliases: BUTTON, TT, PRE
</li>
226 <li>Added truncToFixed(aNumber, precision) and roundToFixed(aNumber, precision)
227 to MochiKit.Format
</li>
228 <li>MochiKit.DateTime can now handle full ISO
8601 timestamps, specifically
229 isoTimestamp(isoString) will convert them to Date objects, and
230 toISOTimestamp(date, true) will return an ISO
8601 timestamp in UTC
</li>
231 <li>Fixed missing errback for sendXMLHttpRequest when the server does not
233 <li>Fixed infinite recusion bug when using roundClass(
"DIV
", ...)
</li>
234 <li>Fixed a bug in MochiKit.Async wait (and callLater) that prevented them
235 from being cancelled properly
</li>
236 <li>Workaround in MochiKit.Base bind (and partial) for functions that don't
237 have an apply method, such as alert
</li>
238 <li>Reliably return null from the string parsing/manipulation functions if
239 the input can't be coerced to a string (s +
"") or the input makes no sense;
240 e.g. isoTimestamp(null) and isoTimestamp(
"") return null
</li>
242 <p>2005-
10-
08 v0.90
</p>
244 <li>Fixed ISO compliance with toISODate
</li>
245 <li>Added missing operator.sub
</li>
246 <li>Placated Mozilla's strict warnings a bit
</li>
247 <li>Added JSON serialization and unserialization support to MochiKit.Base:
248 serializeJSON, evalJSON, registerJSON. This is very similar to the repr
250 <li>Fixed a bug in the script loader that failed in some scenarios when a script
251 tag did not have a
"src
" attribute (thanks Ian!)
</li>
252 <li>Added new MochiKit.DOM createDOMFunc aliases: H1, H2, H3, BR, HR, TEXTAREA,
254 <li>Use encodeURIComponent / decodeURIComponent for MochiKit.Base urlEncode
255 and parseQueryString, when available.
</li>
257 <p>2005-
08-
12 v0.80
</p>
259 <li>Source highlighting in all examples, moved to a view-source example
</li>
260 <li>Added some experimental syntax highlighting for the Rounded Corners example,
261 via the LGPL dp.SyntaxHighlighter
1.2.0 now included in examples/common/lib
</li>
262 <li>Use an indirect binding for the logger conveniences, so that the global
263 logger could be replaced by setting MochiKit.Logger.logger to something else
264 (though an observer is probably a better choice).
</li>
265 <li>Allow MochiKit.DOM.getElementsByTagAndClassName to take a string for parent,
266 which will be looked up with getElement
</li>
267 <li>Fixed bug in MochiKit.Color.fromBackground (was using node.parent instead of
268 node.parentNode)
</li>
269 <li>Consider a
304 (NOT_MODIFIED) response from XMLHttpRequest to be success
</li>
270 <li>Disabled Mozilla map(...) fast-path due to Deer Park compatibility issues
</li>
271 <li>Possible workaround for Safari issue with swapDOM, where it would get
272 confused because two elements were in the DOM at the same time with the
274 <li>Added missing THEAD convenience function to MochiKit.DOM
</li>
275 <li>Added lstrip, rstrip, strip to MochiKit.Format
</li>
276 <li>Added updateNodeAttributes, appendChildNodes, replaceChildNodes to
278 <li>MochiKit.Iter.iextend now has a fast-path for array-like objects
</li>
279 <li>Added HSV color space support to MochiKit.Visual
</li>
280 <li>Fixed a bug in the sortable_tables example, it now converts types
282 <li>Fixed a bug where MochiKit.DOM referenced MochiKit.Iter.next from global
285 <p>2005-
08-
04 v0.70
</p>
287 <li>New ajax_tables example, which shows off XMLHttpRequest, ajax, json, and
288 a little TAL-ish DOM templating attribute language.
</li>
289 <li>sendXMLHttpRequest and functions that use it (loadJSONDoc, etc.) no longer
290 ignore requests with status ==
0, which seems to happen for cached or local
292 <li>Added sendXMLHttpRequest to MochiKit.Async.EXPORT, d'oh.
</li>
293 <li>Changed scrapeText API to return a string by default. This is API-breaking!
294 It was dumb to have the default return value be the form you almost never
296 <li>Added special form to swapDOM(dest, src). If src is null, dest is removed
297 (where previously you'd likely get a DOM exception).
</li>
298 <li>Added three new functions to MochiKit.Base for dealing with URL query
299 strings: urlEncode, queryString, parseQueryString
</li>
300 <li>MochiKit.DOM.createDOM will now use attr[k] = v for all browsers if the name
301 starts with
"on
" (e.g.
"onclick
"). If v is a string, it will set it to
302 new Function(v).
</li>
303 <li>Another workaround for Internet
"worst browser ever
" Explorer's setAttribute
304 usage in MochiKit.DOM.createDOM (checked -
> defaultChecked).
</li>
305 <li>Added UL, OL, LI convenience createDOM aliases to MochiKit.DOM
</li>
306 <li>Packing is now done by Dojo's custom Rhino interpreter, so it's much smaller
309 <p>2005-
07-
29 v0.60
</p>
311 <li>Beefed up the MochiKit.DOM test suite
</li>
312 <li>Fixed return value for MochiKit.DOM.swapElementClass, could return
313 false unexpectedly before
</li>
314 <li>Added an optional
"parent
" argument to
315 MochiKit.DOM.getElementsByTagAndClassName
</li>
316 <li>Added a
"packed
" version in packed/MochiKit/MochiKit.js
</li>
317 <li>Changed build script to rewrite the URLs in tests to account for the
318 JSAN-required reorganization
</li>
319 <li>MochiKit.Compat to potentially work around IE
5.5 issues
320 (
5.0 still not supported). Test.Simple doesn't seem to work there,
322 <li>Several minor documentation corrections
</li>
324 <p>2005-
07-
27 v0.50
</p>
326 <li>Initial Release
</li>