This repository has been archived by the owner on Mar 24, 2020. It is now read-only.
/
goml_element.go
62 lines (52 loc) · 1.65 KB
/
goml_element.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package gom
// GOMLElement interface represents any GOML element
type GOMLElement interface {
/* EMBEDDED INTERFACE */
Element
/* GETTERS & SETTERS (props) */
Hidden() bool
InnerText() string
SetInnerText(string)
Style() interface{}
/* METHODS */
Click()
}
var _ GOMLElement = &gomlElement{}
var _ Element = &gomlElement{}
var _ Node = &gomlElement{}
type gomlElement struct {
*element
}
/*****************************************************
**************** Getters & Setters ******************
*****************************************************/
// ANCHOR Getters & Setters
// Hidden return true if the element is hidden or not.
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/hidden
func (e *gomlElement) Hidden() bool {
// TODO (e *gomlElement) Hidden() bool
return false
}
// InnerText represents the "rendered" text content of
// a node and its descendants.
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText
func (e *gomlElement) InnerText() string {
// TODO (e *gomlElement) InnerText() string
return ""
}
// SetInnerText set the inner text of a GOML element.
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText
func (e *gomlElement) SetInnerText(string) {
// TODO (e *gomlElement) SetInnerText(string)
}
// Style return
func (e *gomlElement) Style() interface{} {
// TODO (e *gomlElement) Style() interface{}
return nil
}
/*****************************************************
********************* Methods ***********************
*****************************************************/
// ANCHOR Methods
// Click handle click event a GOML element.
func (e *gomlElement) Click() {}