WARNING: These documents reflect TRUNK and are a work-in-progress.
Dojo 1.4 Release Notes
The following browsers are supported. If a browser is not supported, it still may work, but no effort is taken to test unsupported browsers and any specific fix for an unsupported browser is likely not to be done:
- Firefox 2 support dropped. Firefox 3.0 through 3.6 supported.
- Safari 4 and Chrome 3/Chrome 4, but not previous versions.
- IE6, IE7, IE8 all supported.
- Latest Opera (Opera 10) (Dojo core only).
- Keyboard now supported in all supported browsers (previously it didn't work on Safari and on Chrome)
- Now there are topics that are published for the pipeline used to handle all IO operations. dojo.xhr, dojo.io.script and dojo.io.iframe all use the IO pipeline, so they can all publish the pipeline topics.
- By default, the topics are turned off. To enable them, set djConfig.ioPublish = true. After they are globally enabled, you can disable them for specific IO requests by setting ioPublish: false in the arg object you pass to dojo.xhr*, dojo.io.script.get() or dojo.io.iframe.send().
- See IO Pipeline Topics for more information.
- Added support for space-separated class names, and arrays of class names.
- See dojo.addClass for more information.
- A new method has been added for caching data from files. In particular it's used in templated widgets in conjunction with templateString, rather than templatePath.
- See also dojo.cache
- Exposed previously "private" dojo._contentHandlers as a public way to write custom XHR handleAs functions
- See also dojo.contentHandlers
- This method in Dojo Base has been deprecated in Dojo 1.4. The returned object is a mixin of dojo.position and dojo.marginBox. Because the x/y position is based on the border-box and the (w)idth/(h)eight attributes represent the margin-box, there was considerable confusion on correctly using the returned object. The new method dojo.position performs much faster. Users needing the l/t/w/h attributes from this method can continue to use dojo.marginBox.
- See also dojo.position
- A new method in Dojo Base (part of dojo.js) that is related to dojo.formToObject(), except instead of converting a whole form to an object, it just converts one form field. Pass it a DOM Node for the field, or the ID of the form field as a string. dojo.fieldToObject returns the value encoded in a form field as as a string or an array of strings. Disabled form elements and unchecked radio and checkboxes are skipped. Multi-select elements are returned as an array of string values.
- See dojo.fieldToObject for more information.
- Considerable performance increase and new API's
- made dojo._Animation public: dojo.Animation
- onEnd, beforeBegin functions are passed the node reference used in the Animation
- start: and end: properties, when using a function, are passed the node reference for the animation
- each property can now be a function, returning either a value, or and object to pass as the value
- See also dojo.fx
- A new method for monitoring, getting and setting the hash value. dojo.hash provides hashchange notification using a new published topic "/dojo/hashchange", enabling cross-browser back/forward support and bookmarkability in AJAX applications. The native HTML 5 onhashchange event is used behind the scenes in browsers that support it.
- See also dojo.hash
- Two mixins for dojo.NodeList are now available. dojo.NodeLists are returned from dojo.query() calls.
- dojo.NodeList-traverse adds methods:
- children
- closest
- parent
- parents
- siblings
- next
- nextAll
- prev
- prevAll
- andSelf
- first
- last
- even
- odd
- dojo.NodeList-manipulate adds methods:
- innerHTML
- html
- text
- val
- append
- appendTo
- prepend
- prependTo
- after
- insertAfter
- before
- insertBefore
- remove
- wrap
- wrapAll
- wrapInner
- replaceWith
- replaceAll
- clone
- Both mixins are modeled after the jQuery APIs that have the same names.
- A new method in Dojo Base (part of dojo.js) that returns the beginning x/y of a DOM node's border-box as well as its width and height. An optional boolean parameter can be specified to change the default coordinate origin point from the viewport to the document root.
- See also dojo.position
- Added support for space-separated class names, arrays of class names, and the ability to remove all classes, if no class was specified.
- See dojo.removeClass for more information.
- A new flexible facility for simple templating based on substitutions.
- See dojo.replace for more information.
- scrolling tab labels now supported (like on Firefox etc.) so that labels don't spill over to two rows when there isn't enough space
- tab labels / pane titles can be changed via pane.attr('title', ...)
- icons added, controlled via iconClass parameter (like for Buttons and MenuItems). To display only icons set showTitle=false.
- tooltip attribute controls tooltip on tab labels or accordion pane titles
- See also dijit.layout.TabContainer
ContentPane now acts as a full layout widget, calling resize() on its child widgets when (not before) it is made visible, avoiding problems with children being initialized while hidden.
- Consequently ContentPane now defines isContainer and isLayoutContainer:
- isContainer's meaning was widened to include any widget that calls startup() on its children, not just widgets that extend dijit._Container
- isLayoutContainer's meaning was widened to include any widget that calls resize() on its children, not just widgets that extend dijit.layout._LayoutContainer
Fixes related to resizing and href loading, including avoiding premature href loading for ContentPanes in nested TabContainers
See also dijit.layout.ContentPane
- widgetsInTemplate widget lifecycle: lots of bug fixes around the lifecycle for widgets in templates. startup() is now called on widgets in templates when startup() is called on the main widget. Templated Layout widgets with widgets in their templates should call resize() on those widgets manually.
- templatePath has been deprecated in favor of templateString used with dojo.cache(), see above.
- Added the simple animation for all bar- and column-based charts by Adam Jones and Dave Clark (IBM).
- Now objects can be used with bar- and column-based charts. It means now we can have custom tooltip/color/fill/stroke for individual rectangles.
- See also dojox.charting
- This widget was out of sync due to the more advanced dojox.json capabilities and has been removed.
- There is an equivalent widget which uses dojox.json ref and query in dojoc/dmachi/data called JsonStore for those who still need this capability. While they are not drop in replacements of each other, they are pretty close and it should not take a significant amount of time to convert, and the benefits gained in performance and querying flexibility are worth it.
- Experimental time zone support via dojox.date.timezone. Based off of the fleegix timezone support by Matthew Eernise.
- See also dojox.date
- A new drawing tool has landed in DojoX.
- dojox.drawing is similar to Sketch, but with an extensible architecture that allows for plugins.
- See also dojox.drawing
Several new plugins for the dijit.Editor RTE have been provided as dojox modules. Unless otherwise noted in their documentation, they are all generally well tested and work well across browsers.
- PrettyPrint: A plugin that formats the output from dijit.Editor more cleanly than the browsers defaults.
- PageBreak: A plugin that lets you insert CSS style page breaks so when printed, the document page breaks at the indicated spot.
- ShowBlockNodes: A plugin that lets you see in the editor what the block structure is that makes up the RTE document.
- Preview: A plugin that lets you preview the editor content in a separate window with different CSS styles and stylesheets applied than what are used in the editor.
- Save: A plugin that simplifies adding a save toolbar action for posting editor content back to a specified url.
- ToolbarLineBreak: A simple plugin that provides a way to break the editor toolbar into multiple lines.
- InsertEntity: An experimental plugin that allows you to do 'symbol' inserts from a select list of entity symbols.
- NormalizeIndentOutdent: An experimental plugin that tries to normalize indent and outdent behavior across browsers.
- FindReplace: An experimental plugin that adds a find/replace toolbar that can be toggled to appear underneath the main toolbar. The plugin provides find and replace text capability to the editor.
- Breadcrumb: An experimental plugin that adds a footer toolbar that shows you what node you are in and all its ancestor nodes. It also provides actions such as selecting all content, deleting the element, and moving the cursor to the start or end of the element contents.
- See also dojox.editor.plugins
- API change to dojox.fx.style functions. dojox.fx.addClass/toggleClass/removeClass now match dojo.addClass/toggleClass/removeClass API's. Documentation added, still experimental.
- Added dojox.fx.ext-dojo.NodeList-style module, mapping dojox.fx.style functions into dojo.NodeList
- dojox.gfx.utils.toSvg - serialize a dojox.gfx surface as a string in SVG format for all browsers (including IE).
- New XSLT file (dojox/gfx/resources/svg2gfx.xsl) to transform bigger subset of SVG to the dojox.gfx JSON-based serialization format by Eric W. Brown.
- Fixed the VML renderer to work on IE8 in the standards mode.
- Screen reader support has degraded when using JAWS 10 due to a change in the way ARIA (Accessible Rich Internet Applications) has been implemented in the grid. The grid column header cells no longer get actual focus since that was preventing proper scrolling via the mouse.
- Due to this change, if focus is in a grid data cell and the user shift-tabs back to the column header, JAWS 10 will not speak the column header text. This will be fixed with the next release of JAWS and Firefox which should provide better screen reader support for ARIA enabled grids.
- See dojox.grid.DataGrid for more information.
The new Enhanced DataGrid extends the base grid in numerous useful ways.
- Nested Sort: The user can now concurrently sort on any number of columns.
- Multiple Column/Row Selection: The user can now select multiple columns or rows through swipe-select or extended selection techniques.
- Drag-drop Multiple Columns and Rows: The user can now move multiple columns or rows in the same action.
- Indirect Selection: Rather than having to manually include radio buttons and check boxes for single and multiple selection models, the Enhanced DataGrid will do it automatically in response to the inclusion of simple attribute-value pairs, e.g., indirectSelection=true, on the grid's div tag.
- Declarative Pop-up Menus: Rather than having to create and assign pop-up menus through scripts, the enhanced DataGrid allows you to specify these menus with straightforward markup.
- See also dojox.grid.EnhancedGrid
- compat grid (dojox.grid.Grid) is now bundled in the dojox/grid directory as a tarball archive for those who would like to continue using the deprecated (1.1) Grid.
- dojox.grid.DataGrid is the replacement.
- The new dojox.html.ellipsis offers cross-browser support for text-overflow: ellipsis
- See also dojox.html.ellipsis
- Adds support for encoding and unencoding HTML/XML entity characters in text.
- Also provides basic mappings of character to entity encoding for HTML and LATIN (8859-1), special characters.
- See also dojox.html.entities
- Extended the dojox.image.LightboxNano to show more than one image with a single LBN instance.
- See also dojox.image.LightboxNano
- dojox.jq is a very experimental module aimed at trying to match the jQuery API as close as possible, but using Dojo underneath. It is still very rough, and there is no fx API support yet.
- dojox.layout.ContentPane.attr('href', ...) now returns a dojo.Deferred rather than a dojox.layout.ContentPane.DeferredHandle custom class. The dojo.Deferred triggers when the load completes (or errors out).
- dojo.layout.GridContainer styles changed, with red borders removed and theme-specific drop indicators added.
- the dojox.off subproject was removed because it is no longer supported. It is still available for download in Dojo 1.3.
- Using Google's Closure Compiler is now supported in the build system. See the Advanced Build Topics docs.
- If/when Dojo 1.4.2 is released, by default the copyTests option defaults to false instead of true. This was done to help reduce the possibility of copying tests in their builds, extra files and more security concerns to worry about.
- A Checkstyle tool has been added in util/checkstyle. This can be used to both flag style guide violations in either Dojo or custom JavaScript code, and also to fix the errors using an online tool.
- See also util.checkstyle
Here are some common issues people have had when upgrading (ie, migrating) from 1.3 to 1.4:
- if your widgets are using templatePath you should ideally update them to use templateString with dojo.cache() instead, or alternately, minimally, make sure that they set templateString to null (to override the templateString setting from a superclass).
- ContentPane acts more as a layout widget than before, defining isLayoutContainer: true. This may break some custom subclasses.
- the startup code for widgetsInTemplate has changed; if you have a custom widget that manually adds sub-widgets into its DOM, be sure to add those sub-widgets to this._startupWidgets[] and also this._supportingWidgets[]. Alternately you can set _earlyTemplatedStartup to true to get the 1.3 behavior
- If your TabContainer is too wide (you must have set width=100% in your markup?), specify controllerWidget=""dijit.layout.TabController" (see Ticket #10495).