]>
git.wh0rd.org - tt-rss.git/blob - lib/dojo/NodeList-html.js
2 Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
3 Available via Academic Free License >= 2.1 OR the modified BSD license.
4 see: http://dojotoolkit.org/license for details
8 if(!dojo
._hasResource
["dojo.NodeList-html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
9 dojo
._hasResource
["dojo.NodeList-html"] = true;
10 dojo
.provide("dojo.NodeList-html");
11 dojo
.require("dojo.html");
15 dojo["NodeList-html"] = {
16 // summary: Adds a chainable html method to dojo.query() / Nodelist instances for setting/replacing node content
20 dojo
.extend(dojo
.NodeList
, {
21 html: function(content
, /* Object? */params
){
23 // see `dojo.html.set()`. Set the content of all elements of this NodeList
26 // Based around `dojo.html.set()`, set the content of the Elements in a
27 // NodeList to the given content (string/node/nodelist), with optional arguments
28 // to further tune the set content behavior.
31 // | dojo.query(".thingList").html("<li dojoType='dojo.dnd.Moveable'>1</li><li dojoType='dojo.dnd.Moveable'>2</li><li dojoType='dojo.dnd.Moveable'>3</li>",
33 // | parseContent: true,
34 // | onBegin: function(){
35 // | this.content = this.content.replace(/([0-9])/g, this.id + ": $1");
36 // | this.inherited("onBegin", arguments);
38 // | }).removeClass("notdone").addClass("done");
40 var dhs
= new dojo
.html
._ContentSetter(params
|| {});
41 this.forEach(function(elm
){
46 return this; // dojo.NodeList