1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/pkg/runtime/values/html.go

50 lines
764 B
Go
Raw Normal View History

2018-09-18 22:42:38 +02:00
package values
import "github.com/MontFerret/ferret/pkg/runtime/core"
type (
HTMLNode interface {
core.Value
2018-09-18 22:42:38 +02:00
NodeType() Int
2018-09-18 22:42:38 +02:00
NodeName() String
2018-09-18 22:42:38 +02:00
Length() Int
2018-09-18 22:42:38 +02:00
InnerText() String
2018-09-18 22:42:38 +02:00
InnerHTML() String
2018-09-18 22:42:38 +02:00
Value() core.Value
2018-09-18 22:42:38 +02:00
GetAttributes() core.Value
2018-09-18 22:42:38 +02:00
GetAttribute(name String) core.Value
2018-09-18 22:42:38 +02:00
GetChildNodes() core.Value
2018-09-18 22:42:38 +02:00
GetChildNode(idx Int) core.Value
2018-09-18 22:42:38 +02:00
QuerySelector(selector String) core.Value
2018-09-18 22:42:38 +02:00
QuerySelectorAll(selector String) core.Value
InnerHTMLBySelector(selector String) String
InnerHTMLBySelectorAll(selector String) *Array
InnerTextBySelector(selector String) String
InnerTextBySelectorAll(selector String) *Array
CountBySelector(selector String) Int
}
HTMLDocument interface {
HTMLNode
URL() core.Value
}
)