Documentation ¶
Index ¶
- type Document
- func (el *Document) AddEventListener(eventType interface{}, mouseMoveEvt js.Func)
- func (el *Document) AppendChild(element string, value interface{})
- func (el *Document) AppendToDocument(value interface{})
- func (el Document) CreateElement(name string, cssClass []string, properties ...P) (element js.Value, err error)
- func (el Document) CreateElementAndAppend(appendId string, name string, cssClass []string, properties ...P) (element js.Value, err error)
- func (el *Document) Get() js.Value
- func (el Document) GetDocumentHeight() (height int)
- func (el Document) GetDocumentWidth() (width int)
- func (el Document) GetElementById(document Document, id string) (element interface{})
- func (el Document) GetElementStyle(element interface{}, style string) (value interface{})
- func (el *Document) Init()
- func (el *Document) MousePointerAuto()
- func (el *Document) MousePointerHide()
- func (el *Document) RemoveFromDocument(value interface{})
- func (el Document) ResizeToScreen()
- func (el Document) SetElementStyle(element interface{}, style string, value interface{})
- func (el *Document) SetMousePointer(value mouse.CursorType)
- type GenericElementTypes
- type P
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func (*Document) AddEventListener ¶
func (*Document) AppendChild ¶
func (*Document) AppendToDocument ¶
func (el *Document) AppendToDocument(value interface{})
AppendToDocument
English:
Adds an element to the document. Input: value: js.Value element containing an html document.
Português:
Adiciona um elemento ao documento. Entrada: value: elemento js.Value contendo um documento html.
func (Document) CreateElement ¶
func (el Document) CreateElement(name string, cssClass []string, properties ...P) (element js.Value, err error)
CreateElement
English:
In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized. Note: * A new HTMLElement is returned if the document is an HTMLDocument, which is the most common case. Otherwise a new Element is returned.
Português:
Em um documento HTML, o método document.createElement() cria o elemento HTML especificado por tagName ou um HTMLUnknownElement se tagName não for reconhecido. Note: * A new HTMLElement is returned if the document is an HTMLDocument, which is the most common case. Otherwise a new Element is returned.
func (Document) CreateElementAndAppend ¶
func (el Document) CreateElementAndAppend(appendId string, name string, cssClass []string, properties ...P) (element js.Value, err error)
CreateElementAndAppend
English:
In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized. Note: * A new HTMLElement is returned if the document is an HTMLDocument, which is the most common case. Otherwise a new Element is returned.
Português:
Em um documento HTML, o método document.createElement() cria o elemento HTML especificado por tagName ou um HTMLUnknownElement se tagName não for reconhecido. Note: * A new HTMLElement is returned if the document is an HTMLDocument, which is the most common case. Otherwise a new Element is returned.
func (Document) GetDocumentHeight ¶
GetDocumentHeight
English:
Returns the length of the document in pixels. Output: width: document size in pixels.
Português:
Retorna a altura do documento em pixels. Saída: width: tamanho do documento em pixels.
func (Document) GetDocumentWidth ¶
GetDocumentWidth
English:
Returns the width of the document in pixels. Output: width: document size in pixels.
Português:
Retorna o comprimento do documento em pixels. Saída: width: tamanho do documento em pixels.
func (Document) GetElementById ¶
GetElementById
Português:
Retorna a referência do elemento através do seu ID. Entrada: id: string que diferência maiúsculas e minúsculas representando o ID único do elemento sendo procurado. Nota: * Elemento é uma referência a um objeto Element, ou null se um elemento com o ID especificado não estiver contido neste documento. * Se não existe um elemento com o id fornecido, esta função retorna null. Note, o parâmetro ID diferência maiúsculas e minúsculas. Assim document.getElementById("Main") retornará null ao invés do elemento <div id="main">, devido a "M" e "m" diferirem para o objetivo deste método; * Elementos que não estão no documento não são procurados por getElementById. Quando criar um elemento e atribuir um ID ao mesmo, você deve inserir o elemento na árvore do documento com insertBefore ou método similar antes que você possa acessá-lo com getElementById: var elemento = document.createElement("div"); elemento.id = 'testqq'; var el = document.getElementById('testqq'); // el será null! * Documentos não-HTML, a implementação do DOM deve ter informações que diz quais atributos são do tipo ID. Atributos com o nome "id" não são do tipo ID a menos que assim sejam definidos nos documentos DTD. O atributo id é definido para ser um tipo ID em casos comuns de XHTML, XUL, e outros. Implementações que não reconhecem se os atributos são do tipo ID, ou não são esperados retornam null.
func (Document) GetElementStyle ¶
func (*Document) Init ¶
func (el *Document) Init()
Init
English:
Initializes the document with the browser's main document.
Português:
Inicializa o documento com o documento principal do navegador.
func (*Document) MousePointerAuto ¶
func (el *Document) MousePointerAuto()
MousePointerAuto
English:
Sets the mouse pointer to auto.
Português:
Define o ponteiro do mouse como automático.
func (*Document) MousePointerHide ¶
func (el *Document) MousePointerHide()
MousePointerHide
English:
Sets the mouse pointer to hide.
Português:
Define o ponteiro do mouse como oculto.
func (*Document) RemoveFromDocument ¶
func (el *Document) RemoveFromDocument(value interface{})
RemoveFromDocument
English:
Removes an html element from the document. Input: value: js.Value element containing an html document.
Português:
Remove um elemento html do documento. Entrada: value: elemento js.Value contendo um documento html.
func (Document) ResizeToScreen ¶
func (el Document) ResizeToScreen()
ResizeToScreen
English:
Resizes the document to the size of the main document.
Português:
Redimensiona o documento para o tamanho do documento principal.
func (Document) SetElementStyle ¶
func (*Document) SetMousePointer ¶
func (el *Document) SetMousePointer(value mouse.CursorType)
SetMousePointer
English:
Defines the shape of the mouse pointer. Input: value: mouse pointer shape. Example: SetMousePointer(mouse.KCursorCell) // Use mouse.K... and let autocomplete do the rest
Português:
Define o formato do ponteiro do mouse. Entrada: V: formato do ponteiro do mouse. Exemplo: SetMousePointer(mouse.KCursorCell) // Use mouse.K... e deixe o autocompletar fazer o resto
type GenericElementTypes ¶
type GenericElementTypes string
Click to show internal directories.
Click to hide internal directories.