Update documentation to include manipulation functions

This commit is contained in:
Andrew Stone
2014-10-29 11:58:26 -04:00
parent 9b29a63ff5
commit e7ef1f75eb
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
[![GoDoc](https://godoc.org/github.com/PuerkitoBio/goquery?status.png)](http://godoc.org/github.com/PuerkitoBio/goquery)
GoQuery brings a syntax and a set of features similar to [jQuery][] to the [Go language][go]. It is based on Go's [net/html package][html] and the CSS Selector library [cascadia][]. Since the net/html parser returns tokens (nodes), and not a full-featured DOM object, jQuery's manipulation and modification functions have been left off (no point in modifying data in the parsed tree of the HTML, it has no effect).
GoQuery brings a syntax and a set of features similar to [jQuery][] to the [Go language][go]. It is based on Go's [net/html package][html] and the CSS Selector library [cascadia][]. Since the net/html parser returns tokens (nodes), and not a full-featured DOM object with a rendering engine, jQuery's stateful manipulation functions (like height(), css(), detach()) have been left off as they can't really be used.
Also, because the net/html parser requires UTF-8 encoding, so does goquery: it is the caller's responsibility to ensure that the source document provides UTF-8 encoded HTML.
+10 -2
View File
@@ -77,8 +77,17 @@ The various methods are split into files based on the category of behavior:
- EachWithBreak()
- Map()
* manipulation.go : methods for modifying the document
- After...()
- Append...()
- Before...()
- Clone()
- Empty
- Remove...()
* property.go : methods that inspect and get the node's properties values.
- Attr()
- Attr(), RemoveAttr(), SetAttr()
- AddClass(), HasClass(), RemoveClass(), RemoveClasses(), ToggleClass()
- Html()
- Length()
- Size(), which is an alias for Length()
@@ -86,7 +95,6 @@ The various methods are split into files based on the category of behavior:
* query.go : methods that query, or reflect, a node's identity.
- Contains()
- HasClass()
- Is...()
* traversal.go : methods to traverse the HTML document tree.