Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

document update attributes and a bump

  • Loading branch information...
commit 3e16a7a595d3eddc9083b0021c113c1f24da03df 1 parent a3e46be
@substack authored
Showing with 11 additions and 17 deletions.
  1. +10 −16 README.markdown
  2. +1 −1  package.json
View
26 README.markdown
@@ -191,26 +191,20 @@ Get the inner text and html for the element, which may not have arrived yet.
`cb(text)` fires when the inner contents are ready.
-node.update(cb)
----------------
-
-Replace the node's inner contents with the string return value from `cb(html)`.
-
-node.update(html)
------------------
-
-Replace the node's inner contents with a string `html`.
+node.update(cb, attr), node.update(html, attr)
+----------------------------------------------
-node.replace(cb)
-----------------
+Replace the node's inner contents with the string `html` or the string return
+value from `cb(html)`.
-Replace the node's outer content with the string return value from
-`cb(html)`. The `html` will be the outer contents.
+If `attr` is specified, these will be used in the output stream as the new tag
+attributes instead of `node.attributes`.
-node.replace(html)
-------------------
+node.replace(cb), node.replace(html)
+------------------------------------
-Replace the node's outer contents with a string `html`.
+Replace the node's outer content with the string `html` or the return value from
+`cb(html)`. The `html` passed to `cb` will be the outer contents.
node.remove()
-------------
View
2  package.json
@@ -1,6 +1,6 @@
{
"name" : "trumpet",
- "version" : "0.2.5",
+ "version" : "0.2.6",
"description" : "parse and transform streaming html using css selectors",
"main" : "index.js",
"directories" : {
Please sign in to comment.
Something went wrong with that request. Please try again.