From 1354d17270961fff662d40f90521223f8fd0d73b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Aug 2012 18:59:10 +0400 Subject: update dojo to 1.7.3 --- lib/dojo/NodeList-html.js.uncompressed.js | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 lib/dojo/NodeList-html.js.uncompressed.js (limited to 'lib/dojo/NodeList-html.js.uncompressed.js') diff --git a/lib/dojo/NodeList-html.js.uncompressed.js b/lib/dojo/NodeList-html.js.uncompressed.js new file mode 100644 index 000000000..9e7312d8b --- /dev/null +++ b/lib/dojo/NodeList-html.js.uncompressed.js @@ -0,0 +1,55 @@ +define("dojo/NodeList-html", ["./query", "./_base/lang", "./html"], function(query, lang, html) { + // module: + // dojo/NodeList-html + // summary: + // TODOC + +var NodeList = query.NodeList; + +/*===== +dojo["NodeList-html"] = { + // summary: Adds a chainable html method to dojo.query() / Nodelist instances for setting/replacing node content +}; + +// doc helper aliases: +NodeList = dojo.NodeList; +=====*/ + +lang.extend(NodeList, { + html: function(/* String|DomNode|NodeList? */ content, /* Object? */params){ + // summary: + // see `dojo.html.set()`. Set the content of all elements of this NodeList + // + // content: + // An html string, node or enumerable list of nodes for insertion into the dom + // + // params: + // Optional flags/properties to configure the content-setting. See dojo.html._ContentSetter + // + // description: + // Based around `dojo.html.set()`, set the content of the Elements in a + // NodeList to the given content (string/node/nodelist), with optional arguments + // to further tune the set content behavior. + // + // example: + // | dojo.query(".thingList").html("
  • 1
  • 2
  • 3
  • ", + // | { + // | parseContent: true, + // | onBegin: function(){ + // | this.content = this.content.replace(/([0-9])/g, this.id + ": $1"); + // | this.inherited("onBegin", arguments); + // | } + // | }).removeClass("notdone").addClass("done"); + + var dhs = new html._ContentSetter(params || {}); + this.forEach(function(elm){ + dhs.node = elm; + dhs.set(content); + dhs.tearDown(); + }); + return this; // dojo.NodeList + } +}); + +return NodeList; +}); -- cgit v1.2.3