Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/_base/html.js

  • Provides:

    • dojo._base.html
  • Requires:

    • dojo.lib.kernel in common
    • dojo._base.lang in common
  • dojo.byId

    • parameters:
      • id: (typeof String|DOMNode)
        A string to match an HTML id attribute or a reference to a DOM Node
      • doc: (typeof Document)
        Document to work in. Defaults to the current value of
        dojo.doc.  Can be used to retrieve
        node references from other documents.
    • returns
      DomNode
    • summary
      Returns DOM node with matching <code>id</code> attribute or <code>null</code>
      if not found. If <code>id</code> is a DomNode, this function is a no-op.
    • example
      Look up a node by ID:
      	var n = dojo.byId("foo");
    • example
      Check if a node exists, and use it.
      	var n = dojo.byId("bar");
      	if(n){ doStuff() ... }
    • example
      Allow string or DomNode references to be passed to a custom function:
      	var foo = function(nodeOrId){
      		nodeOrId = dojo.byId(nodeOrId);
      		// ... more stuff
      	}
    • alias - dojo.byId
    • type
      Function
  • dojo

    • alias - dojo
  • dojo._destroyElement

    • parameters:
      • node
    • summary
      Existing alias for <code>dojo.destroy</code>. Deprecated, will be removed
      in 2.0
    • type
      Function
  • dojo.destroy

    • parameters:
      • node: (typeof String|DomNode)
        A String ID or DomNode reference of the element to be destroyed
    • summary
      Removes a node from its parent, clobbering it and all of its
      children.
    • description
      Removes a node from its parent, clobbering it and all of its
      children. Function only works with DomNodes, and returns nothing.
    • example
      Destroy a node byId:
      	dojo.destroy("someId");
    • example
      Destroy all nodes in a list by reference:
      	dojo.query(".someNode").forEach(dojo.destroy);
    • type
      Function
  • dojo.isDescendant

    • parameters:
      • node: (typeof DomNode|String)
        string id or node reference to test
      • ancestor: (typeof DomNode|String)
        string id or node reference of potential parent to test against
    • returns
      Boolean
    • summary
      Returns true if node is a descendant of ancestor
    • example
      Test is node id="bar" is a descendant of node id="foo"
      	if(dojo.isDescendant("bar", "foo")){ ... }
    • type
      Function
  • dojo.setSelectable

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to node
      • selectable: (typeof Boolean)
        state to put the node in. false indicates unselectable, true
        allows selection.
    • summary
      Enable or disable selection on a node
    • example
      Make the node id="bar" unselectable
      	dojo.setSelectable("bar");
    • example
      Make the node id="bar" selectable
      	dojo.setSelectable("bar", true);
    • type
      Function
  • dojo.place

    • parameters:
      • node: (typeof String|DomNode)
        id or node reference, or HTML fragment starting with &quot;&lt;&quot; to place relative to refNode
      • refNode: (typeof String|DomNode)
        id or node reference to use as basis for placement
      • position: (typeof String|Number)
        string noting the position of node relative to refNode or a
        number indicating the location in the childNodes collection of refNode.
        Accepted string values are:
        	* before
        	* after
        	* replace
        	* only
        	* first
        	* last
        &quot;first&quot; and &quot;last&quot; indicate positions as children of refNode, &quot;replace&quot; replaces refNode,
        &quot;only&quot; replaces all children.  position defaults to &quot;last&quot; if not specified
    • returns
      DomNode
    • summary
      Attempt to insert node into the DOM, choosing from various positioning options.
      Returns the first argument resolved to a DOM node.
    • return_summary
      DomNode
      Returned values is the first argument resolved to a DOM node.
      
      .place() is also a method of `dojo.NodeList`, allowing `dojo.query` node lookups.
    • example
      Place a node by string id as the last child of another node by string id:
      	dojo.place("someNode", "anotherNode");
    • example
      Place a node by string id before another node by string id
      	dojo.place("someNode", "anotherNode", "before");
    • example
      Create a Node, and place it in the body element (last child):
      	dojo.place("<div></div>", dojo.body());
    • example
      Put a new LI as the first child of a list by id:
      	dojo.place("<li></li>", "someUl", "first");
    • type
      Function
  • dojo.boxModel

    • type
      String
  • dojo.getComputedStyle

    • parameters:
      • node: (typeof DOMNode)
        A reference to a DOM node. Does NOT support taking an
        ID string for speed reasons.
    • returns
      CSS2Properties
    • summary
      Returns a &quot;computed style&quot; object.
    • description
      Gets a "computed style" object which can be used to gather
      information about the current state of the rendered node.
      
      Note that this may behave differently on different browsers.
      Values may have different formats and value encodings across
      browsers.
      
      Note also that this method is expensive.  Wherever possible,
      reuse the returned object.
      
      Use the dojo.style() method for more consistent (pixelized)
      return values.
    • example
      	dojo.getComputedStyle(dojo.byId('foo')).borderWidth;
    • example
      Reusing the returned object, avoiding multiple lookups:
      	var cs = dojo.getComputedStyle(dojo.byId("someNode"));
      	var w = cs.width, h = cs.height;
    • alias - gcs
    • type
      Function
  • dojo._toPixelValue

    • parameters:
      • element
      • value
      • avalue
    • alias - dojo._toPixelValue
    • type
      Function
  • dojo._getOpacity

    • parameters:
      • node: (typeof DomNode)
        a reference to a DOM node. Does NOT support taking an
        ID string for speed reasons.
    • returns
      Number
    • summary
      Returns the current opacity of the passed node as a
      floating-point value between 0 and 1.
    • return_summary
      Number between 0 and 1
    • type
      Function
  • dojo._setOpacity

    • parameters:
      • node: (typeof DOMNode)
        a reference to a DOM node. Does NOT support taking an
        ID string for performance reasons.
      • opacity: (typeof Number)
        A Number between 0 and 1. 0 specifies transparent.
    • returns
      Number
    • summary
      set the opacity of the passed node portably. Returns the
      new opacity of the node.
    • return_summary
      Number between 0 and 1
    • type
      Function
  • dojo.style

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to node to get/set style for
      • style: (typeof String|Object)
        the style property to set in DOM-accessor format
        (&quot;borderWidth&quot;, not &quot;border-width&quot;) or an object with key/value
        pairs suitable for setting each property.
      • value: (typeof String)
        If passed, sets value on the node for style, handling
        cross-browser concerns.  When setting a pixel value,
        be sure to include &quot;px&quot; in the value. For instance, top: &quot;200px&quot;.
        Otherwise, in some cases, some browsers will not apply the style.
    • summary
      Accesses styles on a node. If 2 arguments are
      passed, acts as a getter. If 3 arguments are passed, acts
      as a setter.
    • description
      Getting the style value uses the computed style for the node, so the value
      will be a calculated value, not just the immediate node.style value.
      Also when getting values, use specific style names,
      like "borderBottomWidth" instead of "border" since compound values like
      "border" are not necessarily reflected as expected.
      If you want to get node dimensions, use `dojo.marginBox()`,
      `dojo.contentBox()` or `dojo.position()`.
    • example
      Passing only an ID or node returns the computed style object of
      the node:
      	dojo.style("thinger");
    • example
      Passing a node and a style property returns the current
      normalized, computed value for that property:
      	dojo.style("thinger", "opacity"); // 1 by default
    • example
      Passing a node, a style property, and a value changes the
      current display of the node and returns the new computed value
      	dojo.style("thinger", "opacity", 0.5); // == 0.5
    • example
      Passing a node, an object-style style property sets each of the values in turn and returns the computed style object of the node:
      	dojo.style("thinger", {
      		"opacity": 0.5,
      		"border": "3px solid black",
      		"height": "300px"
      	});
    • example
      When the CSS style property is hyphenated, the JavaScript property is camelCased.
      font-size becomes fontSize, and so on.
      	dojo.style("thinger",{
      		fontSize:"14pt",
      		letterSpacing:"1.2em"
      	});
    • example
      dojo.NodeList implements .style() using the same syntax, omitting the "node" parameter, calling
      dojo.style() on every element of the list. See: `dojo.query()` and `dojo.NodeList()`
      	dojo.query(".someClassName").style("visibility","hidden");
      	// or
      	dojo.query("#baz > div").style({
      		opacity:0.75,
      		fontSize:"13pt"
      	});
    • type
      Function
  • dojo._getPadExtents

    • parameters:
      • n: (typeof DomNode)
      • computedStyle: (typeof Object)
    • summary
      Returns object with special values specifically useful for node
      fitting.
    • description
      Returns an object with `w`, `h`, `l`, `t` properties:
      		l/t = left/top padding (respectively)
      		w = the total of the left and right padding
      		h = the total of the top and bottom padding
      If 'node' has position, l/t forms the origin for child nodes.
      The w/h are used for calculating boxes.
      Normally application code will not need to invoke this
      directly, and will use the ...box... functions instead.
    • type
      Function
  • dojo._getBorderExtents

    • parameters:
      • n: (typeof DomNode)
      • computedStyle: (typeof Object)
    • summary
      returns an object with properties useful for noting the border
      dimensions.
    • description
      * l/t = the sum of left/top border (respectively)
      * w = the sum of the left and right border
      * h = the sum of the top and bottom border
      
      The w/h are used for calculating boxes.
      Normally application code will not need to invoke this
      directly, and will use the ...box... functions instead.
    • type
      Function
  • dojo._getPadBorderExtents

    • parameters:
      • n: (typeof DomNode)
      • computedStyle: (typeof Object)
    • summary
      Returns object with properties useful for box fitting with
      regards to padding.
    • description
      * l/t = the sum of left/top padding and left/top border (respectively)
      * w = the sum of the left and right padding and border
      * h = the sum of the top and bottom padding and border
      
      The w/h are used for calculating boxes.
      Normally application code will not need to invoke this
      directly, and will use the ...box... functions instead.
    • type
      Function
  • dojo._getMarginExtents

    • parameters:
      • n
      • computedStyle
    • summary
      returns object with properties useful for box fitting with
      regards to box margins (i.e., the outer-box).
      
      * l/t = marginLeft, marginTop, respectively
      * w = total width, margin inclusive
      * h = total height, margin inclusive
      
      The w/h are used for calculating boxes.
      Normally application code will not need to invoke this
      directly, and will use the ...box... functions instead.
    • type
      Function
  • dojo._getMarginBox

    • parameters:
      • node: (typeof DomNode)
      • computedStyle: (typeof Object)
    • summary
      returns an object that encodes the width, height, left and top
      positions of the node's margin box.
    • type
      Function
  • dojo._getMarginSize

    • parameters:
      • node: (typeof DomNode)
      • computedStyle: (typeof Object)
    • summary
      returns an object that encodes the width and height of
      the node's margin box
    • type
      Function
  • dojo._getContentBox

    • parameters:
      • node
      • computedStyle
    • summary
      Returns an object that encodes the width, height, left and top
      positions of the node's content box, irrespective of the
      current box model.
    • type
      Function
  • dojo._getBorderBox

    • parameters:
      • node
      • computedStyle
    • type
      Function
  • dojo._setBox

    • parameters:
      • node: (typeof DomNode)
        DOM Node reference. Id string not supported for performance
        reasons.
      • l: (typeof Number)
        left offset from parent.
      • t: (typeof Number)
        top offset from parent.
      • w: (typeof Number)
        width in current box model.
      • h: (typeof Number)
        width in current box model.
      • u: (typeof String)
        unit measure to use for other measures. Defaults to &quot;px&quot;.
    • summary
      sets width/height/left/top in the current (native) box-model
      dimentions. Uses the unit passed in u.
    • type
      Function
  • dojo._isButtonTag

    • parameters:
      • node: (typeof DomNode)
    • summary
      True if the node is BUTTON or INPUT.type=&quot;button&quot;.
    • type
      Function
  • dojo._usesBorderBox

    • parameters:
      • node: (typeof DomNode)
    • returns
      boolean
    • summary
      True if the node uses border-box layout.
    • type
      Function
  • dojo._setContentSize

    • parameters:
      • node: (typeof DomNode)
      • widthPx: (typeof Number)
      • heightPx: (typeof Number)
      • computedStyle: (typeof Object)
    • summary
      Sets the size of the node's contents, irrespective of margins,
      padding, or borders.
    • type
      Function
  • dojo._setMarginBox

    • parameters:
      • node: (typeof DomNode)
      • leftPx: (typeof Number)
      • topPx: (typeof Number)
      • widthPx: (typeof Number)
      • heightPx: (typeof Number)
      • computedStyle: (typeof Object)
    • summary
      sets the size of the node's margin box and placement
      (left/top), irrespective of box model. Think of it as a
      passthrough to dojo._setBox that handles box-model vagaries for
      you.
    • type
      Function
  • dojo.marginBox

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to DOM Node to get/set box for
      • box: (typeof Object)
        If passed, denotes that dojo.marginBox() should
        update/set the margin box for node. Box is an object in the
        above format. All properties are optional if passed.
    • returns
      Object
    • summary
      Getter/setter for the margin-box of node.
    • description
      Getter/setter for the margin-box of node.
      Returns an object in the expected format of box (regardless
      if box is passed). The object might look like:
      `{ l: 50, t: 200, w: 300: h: 150 }`
      for a node offset from its parent 50px to the left, 200px from
      the top with a margin width of 300px and a margin-height of
      150px.
    • example
      Retrieve the marginbox of a passed node
      	var box = dojo.marginBox("someNodeId");
      	console.dir(box);
    • example
      Set a node's marginbox to the size of another node
      	var box = dojo.marginBox("someNodeId");
      	dojo.marginBox("someOtherNode", box);
    • type
      Function
  • dojo.contentBox

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to DOM Node to get/set box for
      • box: (typeof Object)
        If passed, denotes that dojo.contentBox() should
        update/set the content box for node. Box is an object in the
        above format, but only w (width) and h (height) are supported.
        All properties are optional if passed.
    • returns
      Object
    • summary
      Getter/setter for the content-box of node.
    • description
      Returns an object in the expected format of box (regardless if box is passed).
      The object might look like:
      `{ l: 50, t: 200, w: 300: h: 150 }`
      for a node offset from its parent 50px to the left, 200px from
      the top with a content width of 300px and a content-height of
      150px. Note that the content box may have a much larger border
      or margin box, depending on the box model currently in use and
      CSS values set/inherited for node.
      While the getter will return top and left values, the
      setter only accepts setting the width and height.
    • type
      Function
  • dojo._docScroll

    • type
      Function
  • dojo._isBodyLtr

    • type
      Function
  • dojo._getIeDocumentElementOffset

    • summary
      returns the offset in x and y from the document body to the
      visual edge of the page
    • description
      The following values in IE contain an offset:
      		event.clientX
      		event.clientY
      		node.getBoundingClientRect().left
      		node.getBoundingClientRect().top
      But other position related values do not contain this offset,
      such as node.offsetLeft, node.offsetTop, node.style.left and
      node.style.top. The offset is always (2, 2) in LTR direction.
      When the body is in RTL direction, the offset counts the width
      of left scroll bar's width.  This function computes the actual
      offset.
    • type
      Function
  • dojo._fixIeBiDiScrollLeft

    • parameters:
      • scrollLeft: (typeof Integer)
    • returns
      Integer
    • type
      Function
  • dojo._abs

    • type
      Function
  • dojo.position

    • parameters:
      • node: (typeof DomNode)
      • includeScroll: (typeof Boolean)
    • returns
      Object
    • summary
      Gets the position and size of the passed element relative to
      the viewport (if includeScroll==false), or relative to the
      document root (if includeScroll==true).
    • description
      Returns an object of the form:
      { x: 100, y: 300, w: 20, h: 15 }
      If includeScroll==true, the x and y values will include any
      document offsets that may affect the position relative to the
      viewport.
      Uses the border-box model (inclusive of border and padding but
      not margin).  Does not act as a setter.
    • type
      Function
  • dojo.coords

    • parameters:
      • node: (typeof DomNode|String)
      • includeScroll: (typeof Boolean)
    • summary
      Deprecated: Use position() for border-box x/y/w/h
      or marginBox() for margin-box w/h/l/t.
      Returns an object representing a node's size and position.
    • description
      Returns an object that measures margin-box (w)idth/(h)eight
      and absolute position x/y of the border-box. Also returned
      is computed (l)eft and (t)op values in pixels from the
      node's offsetParent as returned from marginBox().
      Return value will be in the form:
      			{ l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }
      Does not act as a setter. If includeScroll is passed, the x and
      y params are affected as one would expect in dojo.position().
    • type
      Function
  • dojo.hasAttr

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to the element to check
      • name: (typeof String)
        the name of the attribute
    • returns
      Boolean
    • summary
      Returns true if the requested attribute is specified on the
      given element, and false otherwise.
    • return_summary
      true if the requested attribute is specified on the
      given element, and false otherwise
    • type
      Function
  • dojo.attr

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to the element to get or set the attribute on
      • name: (typeof String|Object)
        the name of the attribute to get or set.
      • value: (typeof String)
        The value to set for the attribute
    • returns
      DomNode|Anything
    • summary
      Gets or sets an attribute on an HTML element.
    • description
      Handles normalized getting and setting of attributes on DOM
      Nodes. If 2 arguments are passed, and a the second argumnt is a
      string, acts as a getter.
      
      If a third argument is passed, or if the second argument is a
      map of attributes, acts as a setter.
      
      When passing functions as values, note that they will not be
      directly assigned to slots on the node, but rather the default
      behavior will be removed and the new behavior will be added
      using `dojo.connect()`, meaning that event handler properties
      will be normalized and that some caveats with regards to
      non-standard behaviors for onsubmit apply. Namely that you
      should cancel form submission using `dojo.stopEvent()` on the
      passed event object instead of returning a boolean value from
      the handler itself.
    • return_summary
      when used as a getter, the value of the requested attribute
      or null if that attribute does not have a specified or
      default value;
      
      when used as a setter, the DOM node
    • example
      	// get the current value of the "foo" attribute on a node
      	dojo.attr(dojo.byId("nodeId"), "foo");
      	// or we can just pass the id:
      	dojo.attr("nodeId", "foo");
    • example
      	// use attr() to set the tab index
      	dojo.attr("nodeId", "tabIndex", 3);
    • example
      Set multiple values at once, including event handlers:
      	dojo.attr("formId", {
      		"foo": "bar",
      		"tabIndex": -1,
      		"method": "POST",
      		"onsubmit": function(e){
      			// stop submitting the form. Note that the IE behavior
      			// of returning true or false will have no effect here
      			// since our handler is connect()ed to the built-in
      			// onsubmit behavior and so we need to use
      			// dojo.stopEvent() to ensure that the submission
      			// doesn't proceed.
      			dojo.stopEvent(e);
      
      			// submit the form with Ajax
      			dojo.xhrPost({ form: "formId" });
      		}
      	});
    • example
      Style is s special case: Only set with an object hash of styles
      	dojo.attr("someNode",{
      		id:"bar",
      		style:{
      			width:"200px", height:"100px", color:"#000"
      		}
      	});
    • example
      Again, only set style as an object hash of styles:
      	var obj = { color:"#fff", backgroundColor:"#000" };
      	dojo.attr("someNode", "style", obj);
      
      	// though shorter to use `dojo.style()` in this case:
      	dojo.style("someNode", obj);
    • type
      Function
  • dojo.removeAttr

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to the element to remove the attribute from
      • name: (typeof String)
        the name of the attribute to remove
    • summary
      Removes an attribute from an HTML element.
    • type
      Function
  • dojo.getNodeProp

    • parameters:
      • node: (typeof DomNode|String)
        id or reference to the element to remove the attribute from
      • name: (typeof String)
        the name of the attribute
    • returns
      Anything
    • summary
      Returns an effective value of a property or an attribute.
    • type
      Function
  • dojo.create

    • parameters:
      • tag: (typeof String|DomNode)
        A string of the element to create (eg: &quot;div&quot;, &quot;a&quot;, &quot;p&quot;, &quot;li&quot;, &quot;script&quot;, &quot;br&quot;),
        or an existing DOM node to process.
      • attrs: (typeof Object)
        An object-hash of attributes to set on the newly created node.
        Can be null, if you don't want to set any attributes/styles.
        See: <code>dojo.attr</code> for a description of available attributes.
      • refNode: (typeof String|DomNode)
        Optional reference node. Used by <code>dojo.place</code> to place the newly created
        node somewhere in the dom relative to refNode. Can be a DomNode reference
        or String ID of a node.
      • pos: (typeof String)
        Optional positional reference. Defaults to &quot;last&quot; by way of <code>dojo.place</code>,
        though can be set to &quot;first&quot;,&quot;after&quot;,&quot;before&quot;,&quot;last&quot;, &quot;replace&quot; or &quot;only&quot;
        to further control the placement of the new node relative to the refNode.
        'refNode' is required if a 'pos' is specified.
    • returns
      DomNode
    • summary
      Create an element, allowing for optional attribute decoration
      and placement.
    • description
      A DOM Element creation function. A shorthand method for creating a node or
      a fragment, and allowing for a convenient optional attribute setting step,
      as well as an optional DOM placement reference.
      
      Attributes are set by passing the optional object through `dojo.attr`.
      See `dojo.attr` for noted caveats and nuances, and API if applicable.
      
      Placement is done via `dojo.place`, assuming the new node to be the action
      node, passing along the optional reference node and position.
    • return_summary
      DomNode
    • example
      Create a DIV:
      	var n = dojo.create("div");
    • example
      Create a DIV with content:
      	var n = dojo.create("div", { innerHTML:"<p>hi</p>" });
    • example
      Place a new DIV in the BODY, with no attributes set
      	var n = dojo.create("div", null, dojo.body());
    • example
      Create an UL, and populate it with LI's. Place the list as the first-child of a
      node with id="someId":
      	var ul = dojo.create("ul", null, "someId", "first");
      	var items = ["one", "two", "three", "four"];
      	dojo.forEach(items, function(data){
      		dojo.create("li", { innerHTML: data }, ul);
      	});
    • example
      Create an anchor, with an href. Place in BODY:
      	dojo.create("a", { href:"foo.html", title:"Goto FOO!" }, dojo.body());
    • example
      Create a `dojo.NodeList()` from a new element (for syntatic sugar):
      	dojo.query(dojo.create('div'))
      		.addClass("newDiv")
      		.onclick(function(e){ console.log('clicked', e.target) })
      		.place("#someNode"); // redundant, but cleaner.
    • type
      Function
  • dojo.empty

    • parameters:
      • node: (typeof DOMNode|String)
        a reference to a DOM node or an id.
    • summary
      safely removes all children of the node.
    • example
      Destroy node's children byId:
      	dojo.empty("someId");
    • example
      Destroy all nodes' children in a list by reference:
      	dojo.query(".someNode").forEach(dojo.empty);
    • type
      Function
  • dojo._toDom

    • parameters:
      • frag: (typeof String)
        the HTML fragment
      • doc: (typeof DocumentNode)
        optional document to use when creating DOM nodes, defaults to
        dojo.doc if not specified.
    • summary
      converts HTML string into DOM nodes.
    • return_summary
      DocumentFragment
    • example
      Create a table row:
      	var tr = dojo._toDom("<tr><td>First!</td></tr>");
    • returns
      DOMNode
    • type
      Function
  • dojo.hasClass

    • parameters:
      • node: (typeof DomNode|String)
        String ID or DomNode reference to check the class for.
      • classStr: (typeof String)
        A string class name to look for.
    • returns
      Boolean
    • summary
      Returns whether or not the specified classes are a portion of the
      class list currently applied to the node.
    • example
      Do something if a node with id="someNode" has class="aSillyClassName" present
      	if(dojo.hasClass("someNode","aSillyClassName")){ ... }
    • type
      Function
  • dojo.addClass

    • parameters:
      • node: (typeof DomNode|String)
        String ID or DomNode reference to add a class string too
      • classStr: (typeof String|Array)
        A String class name to add, or several space-separated class names,
        or an array of class names.
    • summary
      Adds the specified classes to the end of the class list on the
      passed node. Will not re-apply duplicate classes.
    • example
      Add a class to some node:
      	dojo.addClass("someNode", "anewClass");
    • example
      Add two classes at once:
      	dojo.addClass("someNode", "firstClass secondClass");
    • example
      Add two classes at once (using array):
      	dojo.addClass("someNode", ["firstClass", "secondClass"]);
    • example
      Available in `dojo.NodeList` for multiple additions
      	dojo.query("ul > li").addClass("firstLevel");
    • type
      Function
  • dojo.removeClass

    • parameters:
      • node: (typeof DomNode|String)
        String ID or DomNode reference to remove the class from.
      • classStr: (typeof String|Array)
        An optional String class name to remove, or several space-separated
        class names, or an array of class names. If omitted, all class names
        will be deleted.
    • summary
      Removes the specified classes from node. No <code>dojo.hasClass</code>
      check is required.
    • example
      Remove a class from some node:
      	dojo.removeClass("someNode", "firstClass");
    • example
      Remove two classes from some node:
      	dojo.removeClass("someNode", "firstClass secondClass");
    • example
      Remove two classes from some node (using array):
      	dojo.removeClass("someNode", ["firstClass", "secondClass"]);
    • example
      Remove all classes from some node:
      	dojo.removeClass("someNode");
    • example
      Available in `dojo.NodeList()` for multiple removal
      	dojo.query(".foo").removeClass("foo");
    • type
      Function
  • dojo.replaceClass

    • parameters:
      • node: (typeof DomNode|String)
        String ID or DomNode reference to remove the class from.
      • addClassStr: (typeof String|Array)
        A String class name to add, or several space-separated class names,
        or an array of class names.
      • removeClassStr: (typeof String|Array)
        A String class name to remove, or several space-separated class names,
        or an array of class names.
    • summary
      Replaces one or more classes on a node if not present.
      Operates more quickly than calling dojo.removeClass and dojo.addClass
    • example
      	dojo.replaceClass("someNode", "add1 add2", "remove1 remove2");
    • example
      Replace all classes with addMe
      	dojo.replaceClass("someNode", "addMe");
    • example
      Available in `dojo.NodeList()` for multiple toggles
      	dojo.query(".findMe").replaceClass("addMe", "removeMe");
    • type
      Function
  • dojo.toggleClass

    • parameters:
      • node: (typeof DomNode|String)
      • classStr: (typeof String|Array)
      • condition: (typeof Boolean)
        If passed, true means to add the class, false means to remove.
    • summary
      Adds a class to node if not present, or removes if present.
      Pass a boolean condition if you want to explicitly add or remove.
    • example
      	dojo.toggleClass("someNode", "hovered");
    • example
      Forcefully add a class
      	dojo.toggleClass("someNode", "hovered", true);
    • example
      Available in `dojo.NodeList()` for multiple toggles
      	dojo.query(".toggleMe").toggleClass("toggleMe");
    • type
      Function
  • dojo._base.html

    • type
      Object
  • dojo._base

    • type
      Object