diff --git a/README.md b/README.md index ee609c8..085db98 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Please note that because of the net/html dependency, goquery requires Go1.1+. **Note that goquery's API is now stable, and will not break.** +* **2015-04-20** : Add `AttrOr` helper method to return the attribute's value or a default value if absent. Thanks to [piotrkowalczuk][piotr]. * **2015-02-04** : Add more manipulation functions - Prepend* - thanks again to [Andrew Stone][thatguystone]. * **2014-11-28** : Add more manipulation functions - ReplaceWith*, Wrap* and Unwrap - thanks again to [Andrew Stone][thatguystone]. * **2014-11-07** : Add manipulation functions (thanks to [Andrew Stone][thatguystone]) and `*Matcher` functions, that receive compiled cascadia selectors instead of selector strings, thus avoiding potential panics thrown by goquery via `cascadia.MustCompile` calls. This results in better performance (selectors can be compiled once and reused) and more idiomatic error handling (you can handle cascadia's compilation errors, instead of recovering from panics, which had been bugging me for a long time). Note that the actual type expected is a `Matcher` interface, that `cascadia.Selector` implements. Other matcher implementations could be used. @@ -109,3 +110,4 @@ The [BSD 3-Clause license][bsd], the same as the [Go language][golic]. Cascadia' [html]: http://godoc.org/golang.org/x/net/html [wiki]: https://github.com/PuerkitoBio/goquery/wiki/Tips-and-tricks [thatguystone]: https://github.com/thatguystone +[piotr]: https://github.com/piotrkowalczuk diff --git a/doc.go b/doc.go index 8abff0f..4d167dd 100644 --- a/doc.go +++ b/doc.go @@ -90,7 +90,7 @@ The three dots (...) indicate that various "overloads" are available. - WrapInner...() * property.go : methods that inspect and get the node's properties values. - - Attr(), RemoveAttr(), SetAttr() + - Attr*(), RemoveAttr(), SetAttr() - AddClass(), HasClass(), RemoveClass(), ToggleClass() - Html() - Length()