8 Commits

Author SHA1 Message Date
Carlana Johnson
511cc3a406 html: add Node.{Ancestors,ChildNodes,Descendants}()
Adds iterators for the parents, immediate children, and all children of a Node respectively.

Fixes golang/go#62113

Change-Id: Iab015872cc3a20fe5e7cae3bc90b89cba68cc3f8
GitHub-Last-Rev: d99de580ab
GitHub-Pull-Request: golang/net#215
Reviewed-on: https://go-review.googlesource.com/c/net/+/594195
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
2024-10-29 04:13:16 +00:00
Nigel Tao
16171245cf html: add the RawNode NodeType
Fixes golang/go#36350

Change-Id: Ia11b65940949b7da996b194d48372bc6219d4baa
Reviewed-on: https://go-review.googlesource.com/c/net/+/216800
Reviewed-by: Kunpei Sakai <namusyaka@gmail.com>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-02-02 09:46:26 +00:00
Kunpei Sakai
4b62a64f59 html: make (*nodeStack)contains distinguish namespace
By proceeding without distinguishing namespace, inconsistency will
occur.
This commit makes the method distinguish the HTML namespace.

Fixes golang/go#27846

Change-Id: I8269f670240c0fe31162a16fbe1ac23acacec00f
Reviewed-on: https://go-review.googlesource.com/c/159397
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2019-01-25 00:28:52 +00:00
namusyaka
500e7a4f95 html: add "in template" insertion mode support
See:
https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-intemplate

Updates golang/go#23071

Change-Id: I36529b7cf5d2adf159ed5c471fba9f67890b7eb9
Reviewed-on: https://go-review.googlesource.com/94838
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-04-15 21:43:07 +00:00
namusyaka
136a25c244 html: update quotes about the list of active formatting elements
See https://html.spec.whatwg.org/multipage/parsing.html#the-list-of-active-formatting-elements

Updates golang/go#23071

Change-Id: I015c394ed34d721e9e4a4d3e797d06d750c1864e
Reviewed-on: https://go-review.googlesource.com/94837
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-16 17:17:45 +00:00
namusyaka
2e7f24ace3 html: update section numbers
Updates golang/go#23071

See https://html.spec.whatwg.org/multipage/

Change-Id: I1bde6e07ae9270ba7b320474b9bec8ec09a79f16
Reviewed-on: https://go-review.googlesource.com/94355
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-02-16 11:01:04 +00:00
Andrew Gerrand
fbe893ddcd go.net: use golang.org/x/... import paths
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/167030043
2014-11-10 09:04:43 +11:00
Nigel Tao
ea127e889c go.net/html: move exp/html and exp/html/atom here to the go.net
sub-repo.

It's a straight copy, except for these modifications:
* "exp/html" and "exp/html/atom" imports were renamed, and
* the "TODO... When this package moves out of exp" comment was
  deleted from atom/atom.go.

The matching change is at https://golang.org/cl/7317043

The rationale was discussed at
https://groups.google.com/d/topic/golang-nuts/Qq5hTQyPuLg/discussion

R=adg, remyoudompheng, dave
CC=golang-dev
https://golang.org/cl/7310063
2013-02-11 11:55:20 +11:00