aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dijit/changes.txt
blob: 525305b13371a3a2700bf3a0ecc3a7a24f8fa1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Changes from Dojo 0.4 dojo.widgets to new dijit project
=======================================================

The widgets and widget infrastructure have been separated into separate project,
vastly streamlined and with a new directory structure.   There are many other changes.

Markup
------

dojoType="button" replaced by dojoType="dijit.Button"  Must use fully qualified class name,
and it's case-sensitive.

Need to manually dojo.require("dojo.parser") to get parsing

Widget namespaces and widget auto-loading are desupported.

onClick="foo" now overrides (ie, replaces) the default onClick() function rather than attaching to it,
so widget designers should make empty onClick() functions (when appropriate).

Programmatic creation
---------------------
Create widgets via

	new dijit.Button(params, srcNodeRef)

createWidget() call removed since multiple renderers are no longer supported (see next section).

At least for the dijit widgets, all widgets are guaranteed to work programmatically, which in
effect means that all widgets must have templates, unless the default <div> works.

Renderers
---------
Removed support for multiple renderers (svg & vml & a11y) for a single widget.
If a widget wants to render differently on different platforms, there must be
branching code inside the widget, or it needs to call a library that branches
based on the browser type (like dojo.gfx or dojo.charting).


Templates
---------
"this." is no longer used within ${} substitution notation.  See ticket #2905.
dojoRoot,buildScriptBase,dojoModuleUrl are no longer supported, but
any JavaScript properties on the widget's 'this' may be referenced with dotted notation.
The attributes dojoOn* are desupported (including dojoOnBuild);
also can't use id attribute to affect a dojoAttachPoint.

dojoAttachEvent is case sensitive, so capitalization matters.   You will probably have
to change

dojoAttachEvent="onClick"

to

dojoAttachEvent="onclick: onClick"

(given that the event name is lowercase, and assuming that the method name is camel case)

lists within dojoAttachPoint, dojoAttachEvent, waiRole, and waiState are now comma-separated
(not separated by semi-colons)

Standard HTML attributes like 'id', 'name', 'lang', etc. are carried over programmatically
by the _Widget constructor and do not need to be declared in the template (see _Widget.attributeMap)

Parent/Child relationships
--------------------------
By default widgets exist as islands, not knowing about their parent widget or children widgets.
The exception is the destroy() function which will also delete all descendant widgets.
Some widgets like Tree and SplitContainer will know about their children, but those widgets
will use the special mixins in Container.js / Layout.js. 

Widget.js base class
--------------------

 - Widget.js, Domwidget.js, HtmlWidget.js combined into dijit.base.Widget, with TemplatedWidget mixin
for widgets with templates

 - on widget creation, postMixInProperties(), buildRendering() and postCreate() is called.
 fillInTemplate() is no longer called.  In addition, those functions call signatures have changed.
 No arguments are passed.  To get the source dom Node, just reference this.srcDomNode.
When postCreate() is called the widget children don't yet exist.

 - The TemplatedWidget mixin defines buildRendering().  widgetsInTemplate not ported yet.

 - onResized() removed

 - the whole parent/child relationship thing is gone

 - extraArgs[] is gone

 - postCreate() called but child widgets don't exist yet

 - templateCssPath ignored.   User must manually include tundra.css file