]>
git.wh0rd.org - tt-rss.git/blob - lib/dojo/NodeList-html.js.uncompressed.js
4348f6df7cf9dec8b7ed45dcfbb6d2c62904f8e2
1 define("dojo/NodeList-html", ["./query", "./_base/lang", "./html"], function(query
, lang
, html
){
9 // Adds a chainable html method to dojo.query() / NodeList instances for setting/replacing node content
13 var NodeList
= query
.NodeList
;
16 lang
.extend(NodeList
, {
17 html: function(/* String|DomNode|NodeList? */ content
, /* Object? */params
){
19 // see `dojo/html.set()`. Set the content of all elements of this NodeList
22 // An html string, node or enumerable list of nodes for insertion into the dom
25 // Optional flags/properties to configure the content-setting. See dojo/html._ContentSetter
28 // Based around `dojo/html.set()`, set the content of the Elements in a
29 // NodeList to the given content (string/node/nodelist), with optional arguments
30 // to further tune the set content behavior.
33 // | query(".thingList").html("<li data-dojo-type='dojo/dnd/Moveable'>1</li><li data-dojo-type='dojo/dnd/Moveable'>2</li><li data-dojo-type='dojo/dnd/Moveable'>3</li>",
35 // | parseContent: true,
36 // | onBegin: function(){
37 // | this.content = this.content.replace(/([0-9])/g, this.id + ": $1");
38 // | this.inherited("onBegin", arguments);
40 // | }).removeClass("notdone").addClass("done");
42 var dhs
= new html
._ContentSetter(params
|| {});
43 this.forEach(function(elm
){
48 return this; // dojo/NodeList