_global

package
v0.0.0-...-a8ee3e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIdToAppendNotFound    = "html.AppendById().error: id to append not found:"
	KNewElementIsUndefined = "div.NewDiv().error: new element is undefined:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalAttributes

type GlobalAttributes struct {
	// contains filtered or unexported fields
}

func (*GlobalAttributes) Append

func (e *GlobalAttributes) Append(append interface{}) (ref *GlobalAttributes)

Append

English:

Adds a node to the end of the list of children of a specified parent node. If the node already
exists in the document, it is removed from its current parent node before being added to the new
parent.

 Input:
   append: element in js.Value format.

 Note:
   * The equivalent of:
       var p = document.createElement("p");
       document.body.appendChild(p);

Português:

Adiciona um nó ao final da lista de filhos de um nó pai especificado. Se o nó já existir no
documento, ele é removido de seu nó pai atual antes de ser adicionado ao novo pai.

 Entrada:
   appendId: elemento no formato js.Value.

 Nota:
   * Equivale a:
       var p = document.createElement("p");
       document.body.appendChild(p);

func (*GlobalAttributes) AppendById

func (e *GlobalAttributes) AppendById(appendId string) (ref *GlobalAttributes)

AppendById

English:

Adds a node to the end of the list of children of a specified parent node. If the node already
exists in the document, it is removed from its current parent node before being added to the
new parent.

 Input:
   appendId: id of parent element.

 Note:
   * The equivalent of:
       var p = document.createElement("p");
       document.body.appendChild(p);

Português:

Adiciona um nó ao final da lista de filhos de um nó pai especificado. Se o nó já existir no
documento, ele é removido de seu nó pai atual antes de ser adicionado ao novo pai.

 Entrada:
   appendId: id do elemento pai.

 Nota:
   * Equivale a:
       var p = document.createElement("p");
       document.body.appendChild(p);

func (*GlobalAttributes) CreateElement

func (e *GlobalAttributes) CreateElement(tag Tag) (ref *GlobalAttributes)

CreateElement

English:

In an HTML document, the Document.createElement() method creates the specified HTML element or an
HTMLUnknownElement if the given element name is not known.

Português:

Em um documento HTML, o método Document.createElement() cria o elemento HTML especificado ou um
HTMLUnknownElement se o nome do elemento dado não for conhecido.

func (*GlobalAttributes) GetInnerHtml

func (e *GlobalAttributes) GetInnerHtml() (html string)

GetInnerHtml

English:

The Element property GetInnerHtml() / SetInnerHtml() gets or sets the HTML or XML markup contained
within the element.

To insert the HTML into the document rather than replace the contents of an element, use the method InsertAdjacentHtml().

Value: A DOMString containing the HTML serialization of the element's descendants.

Note:
  * Setting the value of SetInnerHtml() removes all of the element's descendants and replaces
    them with nodes constructed by parsing the HTML given in the string htmlString.

SyntaxError DOMException

Thrown if an attempt was made to set the value of innerHTML using a string which is not properly-formed HTML.

NoModificationAllowedError DOMException

Thrown if an attempt was made to insert the HTML into a node whose parent is a Document.

Usage notes

The innerHTML property can be used to examine the current HTML source of the page, including any changes that have been made since the page was initially loaded.

Reading the HTML contents of an element

Reading GetInnerHtml() causes the user agent to serialize the HTML or XML fragment comprised of the element's descendants. The resulting string is returned.

Note:
  * The returned HTML or XML fragment is generated based on the current contents of the element,
    so the markup and formatting of the returned fragment is likely not to match the original
    page markup.

Replacing the contents of an element

Setting the value of SetInnerHtml() lets you easily replace the existing contents of an element with new content.

Note:
  * This is a security risk if the string to be inserted might contain potentially malicious
    content. When inserting user-supplied data you should always consider using SetInnerHtml()
    instead, in order to sanitize the content before it is inserted.

Português:

A propriedade Element GetInnerHtml() / SetInnerHtml() obtém ou define a marcação HTML ou XML
contida no elemento.

Para inserir o HTML no documento em vez de substituir o conteúdo de um elemento, use o método InsertAdjacentHtml().

Valor: Um DOMString contendo a serialização HTML dos descendentes do elemento.

Nota:
  * Definir o valor de SetInnerHtml() remove todos os descendentes do elemento e os substitui por
    nós construídos analisando o HTML fornecido na string htmlString.

SyntaxError DOMException

Lançado se foi feita uma tentativa de definir o valor de innerHTML usando uma string que não é HTML corretamente formada.

NoModificationAllowedError DOMException

Lançado se foi feita uma tentativa de inserir o HTML em um nó cujo pai é um Documento.

Notas de uso

A propriedade innerHTML pode ser usada para examinar a fonte HTML atual da página, incluindo quaisquer alterações feitas desde que a página foi carregada inicialmente.

Lendo o conteúdo HTML de um elemento

A leitura de GetInnerHtml() faz com que o agente do usuário serialize o fragmento HTML ou XML composto pelos descendentes do elemento. A string resultante é retornada.

Nota:
  * O fragmento HTML ou XML retornado é gerado com base no conteúdo atual do elemento, portanto,
    a marcação e a formatação do fragmento retornado provavelmente não corresponderão à marcação
    da página original.

Substituindo o conteúdo de um elemento

Definir o valor de SetInnerHtml() permite substituir facilmente o conteúdo existente de um elemento por um novo conteúdo.

Nota:
  * Este é um risco de segurança se a string a ser inserida puder conter conteúdo potencialmente
    mal-intencionado. Ao inserir dados fornecidos pelo usuário, você deve sempre considerar o uso
    de SetInnerHtml(), para limpar o conteúdo antes de ser inserido.

func (*GlobalAttributes) GetInnerText

func (e *GlobalAttributes) GetInnerText() (text string)

GetInnerText

English:

The innerText property of the HTMLElement interface represents the rendered text content of a node
and its descendants.

As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. As a setter this will replace the element's children with the given value, converting any line breaks into <br> elements.

Note:
  * SetInnerText() is easily confused with SetTextContent(), but there are important differences
    between the two:
    Basically, SetInnerText() is aware of the rendered appearance of text, while SetTextContent()
    is not.

Value: A DOMString representing the rendered text content of an element.

If the element itself is not being rendered (for example, is detached from the document or is hidden from view), the returned value is the same as the GetTextContent() property.

Português:

A propriedade innerText da interface HTMLElement representa o conteúdo de texto renderizado de um
nó e seus descendentes.

Como um getter, ele aproxima o texto que o usuário obteria se destacasse o conteúdo do elemento com o cursor e o copiasse para a área de transferência. Como um setter, isso substituirá os filhos do elemento pelo valor fornecido, convertendo qualquer quebra de linha em elementos <br>.

Nota:
  * SetInnerText() é facilmente confundido com SetTextContent(), mas existem diferenças
    importantes entre os dois:
    Basicamente, SetInnerText() está ciente da aparência renderizada do texto, enquanto
    SetTextContent() não.

Valor: Um DOMString que representa o conteúdo de texto renderizado de um elemento.

Se o próprio elemento não estiver sendo renderizado (por exemplo, estiver desanexado do documento ou estiver oculto da exibição), o valor retornado será o mesmo que a propriedade GetTextContent().

func (*GlobalAttributes) GetTextContent

func (e *GlobalAttributes) GetTextContent() (text string)

GetTextContent

English:

The textContent property of the Node interface represents the text content of the node and its
descendants.

 Note:
   * SetTextContent() and SetInnerText() are easily confused, but the two properties are different
     in important ways.
   * Setting SetTextContent() on a node removes all of the node's children and replaces them with
     a single text node with the given string value.

Differences from SetInnerText()

Don't get confused by the differences between GetTextContent() / SetTextContent() and GetInnerText() / SetInnerText(). Although the names seem similar, there are important differences:

GetTextContent() / SetTextContent() gets the content of all elements, including <script> and <style> elements. In contrast, GetInnerText() / SetInnerText() only shows "human-readable" elements.

GetTextContent() returns every element in the node. In contrast, innerText is aware of styling and won't return the text of "hidden" elements.

Moreover, since GetInnerText() / SetInnerText() takes CSS styles into account, reading the value of innerText triggers a reflow to ensure up-to-date computed styles. (Reflows can be computationally expensive, and thus should be avoided when possible.)

Both SetTextContent() and SetInnerText() remove child nodes when altered, but altering innerText in Internet Explorer (version 11 and below) also permanently destroys all descendant text nodes. It is impossible to insert the nodes again into any other element or into the same element after doing so.

Differences from SetInnerHtml()

GetInnerHtml() returns HTML, as its name indicates. Sometimes people use GetInnerHtml() / SetInnerHtml() to retrieve or write text inside an element, but GetTextContent() / SetTextContent() has better performance because its value is not parsed as HTML.

Moreover, using GetTextContent() / SetTextContent() can prevent XSS attacks.

Português:

A propriedade textContent da interface Node representa o conteúdo de texto do nó e seus
descendentes.

 Nota:
   * SetTextContent() e SetInnerText() são facilmente confundidos, mas as duas propriedades são
     diferentes em aspectos importantes;
   * Definir SetTextContent() em um nó remove todos os filhos do nó e os substitui por um único nó
     de texto com o valor de string fornecido.

Diferenças de SetInnerText()

Não se confunda com as diferenças entre GetTextContent() / SetTextContent() e GetInnerText() / SetInnerText(). Embora os nomes pareçam semelhantes, existem diferenças importantes:

GetTextContent() / SetTextContent() obtém o conteúdo de todos os elementos, incluindo os elementos <script> e <style>. Em contraste, GetInnerText() SetInnerText() mostra apenas elementos "legíveis para humanos".

GetTextContent() retorna todos os elementos no nó. Em contraste, innerText está ciente do estilo e não retornará o texto de elementos "ocultos".

Além disso, como GetInnerText() / SetInnerText() leva em consideração os estilos CSS, a leitura do valor de innerText aciona um refluxo para garantir estilos computados atualizados. (Os refluxos podem ser computacionalmente caros e, portanto, devem ser evitados quando possível.)

Ambos SetTextContent() e SetInnerText() removem nós filho quando alterados, mas alterar innerText no Internet Explorer (versão 11 e inferior) também destrói permanentemente todos os nós de texto descendentes. É impossível inserir os nós novamente em qualquer outro elemento ou no mesmo elemento depois de fazê-lo.

Diferenças de SetInnerHtml()

GetInnerHtml() retorna HTML, como seu nome indica. Às vezes, as pessoas usam GetInnerHtml() / SetInnerHtml() para recuperar ou escrever texto dentro de um elemento, mas GetTextContent() / SetTextContent() tem melhor desempenho porque seu valor não é analisado como HTML.

Além disso, usar GetTextContent() / SetTextContent() pode prevenir ataques XSS.

func (*GlobalAttributes) GetX

func (e *GlobalAttributes) GetX() (x int)

GetX

English:

Returns the X axe in pixels.

Português:

Retorna o eixo X em pixels.

func (*GlobalAttributes) GetXY

func (e *GlobalAttributes) GetXY() (x, y int)

GetXY

English:

Returns the X and Y axes in pixels.

Português:

Retorna os eixos X e Y em pixels.

func (*GlobalAttributes) GetY

func (e *GlobalAttributes) GetY() (y int)

GetY

English:

Returns the Y axe in pixels.

Português:

Retorna o eixo Y em pixels.

func (*GlobalAttributes) InsertAdjacentHtml

func (e *GlobalAttributes) InsertAdjacentHtml(position AdjacentPosition, text string) (ref *GlobalAttributes)

InsertAdjacentHtml

English:

The InsertAdjacentHtml() method of the Element interface parses the specified text as HTML or XML
and inserts the resulting nodes into the DOM tree at a specified position.

 Input:
   position: a representing the position relative to the element.
     KAdjacentPositionBeforeBegin: Before the element. Only valid if the element is in the DOM
       tree and has a parent element.
     KAdjacentPositionAfterBegin: Just inside the element, before its first child.
     KAdjacentPositionBeforeEnd: Just inside the element, after its last child.
     KAdjacentPositionAfterEnd: After the element. Only valid if the element is in the DOM tree
       and has a parent element.
   text: The string to be parsed as HTML or XML and inserted into the tree.

Português:

O método InsertAdjacentHtml() da interface Element analisa o texto especificado como HTML ou XML e
insere os nós resultantes na árvore DOM em uma posição especificada.

 Entrada:
   position: a representando a posição relativa ao elemento.
     KAdjacentPositionBeforeBegin: Antes do elemento. Válido apenas se o elemento estiver na
       árvore DOM e tiver um elemento pai.
     KAdjacentPositionAfterBegin: Apenas dentro do elemento, antes de seu primeiro filho.
     KAdjacentPositionBeforeEnd: Apenas dentro do elemento, após seu último filho.
     KAdjacentPositionAfterEnd: Depois do elemento. Válido apenas se o elemento estiver na árvore
       DOM e tiver um elemento pai.
   text: A string a ser analisada como HTML ou XML e inserida na árvore.

func (*GlobalAttributes) SetAccessKey

func (e *GlobalAttributes) SetAccessKey(key string) (ref *GlobalAttributes)

SetAccessKey

English:

Specifies a shortcut key to activate/focus an element.

 Input:
   character: A single character that specifies the shortcut key to activate/focus the element.

 Note:
   * The accessKey attribute value must be a single character (a letter or a digit).
   * Adapting accessKeys to all international languages are difficult.
   * The accessKey value may not be present on all keyboards.

 Warning:
   Using accessKeys is difficult because they may conflict with other key standards in the
   browser;
   To avoid this problem, most browsers will use accessKeys only if pressed together with the Alt
   key.

Português:

Especifica uma tecla de atalho para ativar o foco de um elemento.

 Entrada:
   character: Um único caractere que especifica a tecla de atalho para ativar o foco do elemento.

 Nota:
   * O valor do atributo accessKey deve ser um único caractere (uma letra ou um dígito).
   * Adaptar as teclas de acesso a todos os idiomas internacionais é difícil.
   * O valor accessKey pode não estar presente em todos os teclados.

 Aviso:
   O uso de accessKeys é difícil porque eles podem entrar em conflito com outros padrões
   importantes no navegador;
   Para evitar esse problema, a maioria dos navegadores usará as teclas de acesso somente se
   pressionadas junto com a tecla Alt.

func (*GlobalAttributes) SetAction

func (e *GlobalAttributes) SetAction(action string) (ref *GlobalAttributes)

SetAction

English:

The URL that processes the form submission. This value can be overridden by a formaction
attribute on a <button>, <input type="submit">, or <input type="image"> element.

This attribute is ignored when method="dialog" is set.

Português:

A URL que processa o envio do formulário. Esse valor pode ser substituído por um atributo
formaction em um elemento <button>, <input type="submit"> ou <input type="image">.

Este atributo é ignorado quando method="dialog" é definido.

func (*GlobalAttributes) SetAlt

func (e *GlobalAttributes) SetAlt(alt string) (ref *GlobalAttributes)

SetAlt

English:

The alt attribute provides alternative text for the image, displaying the value of the attribute
if the image src is missing or otherwise fails to load.

Português:

O atributo alt fornece texto alternativo para a imagem, exibindo o valor do atributo se o src da
imagem estiver ausente ou falhar ao carregar.

func (*GlobalAttributes) SetAutocomplete

func (e *GlobalAttributes) SetAutocomplete(autocomplete Autocomplete) (ref *GlobalAttributes)

SetAutocomplete

English:

The HTML autocomplete attribute lets web developers specify what if any permission the user agent
has to provide automated assistance in filling out form field values, as well as guidance to the
browser as to the type of information expected in the field.

It is available on <input> elements that take a text or numeric value as input, <textarea> elements, <select> elements, and <form> elements.

The source of the suggested values is generally up to the browser; typically values come from past values entered by the user, but they may also come from pre-configured values. For instance, a browser might let the user save their name, address, phone number, and email addresses for autocomplete purposes. Perhaps the browser offers the ability to save encrypted credit card information, for autocompletion following an authentication procedure.

If an <input>, <select> or <textarea> element has no autocomplete attribute, then browsers use the autocomplete attribute of the element's form owner, which is either the <form> element that the element is a descendant of, or the <form> whose id is specified by the form attribute of the element.

Note:
  * In order to provide autocompletion, user-agents might require <input>/<select>/<textarea>
    elements to:
      Have a name and/or id attribute;
      Be descendants of a <form> element;
      The form to have a submit button.

Português:

O atributo autocomplete HTML permite que os desenvolvedores da Web especifiquem se existe alguma
permissão que o agente do usuário tenha para fornecer assistência automatizada no preenchimento
dos valores dos campos do formulário, bem como orientação ao navegador quanto ao tipo de
informação esperado no campo.

Ele está disponível em elementos <input> que recebem um texto ou valor numérico como entrada, elementos <textarea>, elementos <select> e elementos <form>.

A origem dos valores sugeridos geralmente depende do navegador; normalmente os valores vêm de valores passados inseridos pelo usuário, mas também podem vir de valores pré-configurados. Por exemplo, um navegador pode permitir que o usuário salve seu nome, endereço, número de telefone e endereços de e-mail para fins de preenchimento automático. Talvez o navegador ofereça a capacidade de salvar informações de cartão de crédito criptografadas, para preenchimento automático após um procedimento de autenticação.

Se um elemento <input>, <select> ou <textarea> não tiver um atributo autocomplete, os navegadores usarão o atributo autocomplete do proprietário do formulário do elemento, que é o elemento <form> do qual o elemento é descendente ou o < form> cujo id é especificado pelo atributo form do elemento.

Nota:
  * Para fornecer preenchimento automático, os agentes do usuário podem exigir elementos
    <input> / <select> / <textarea> para:
      Ter um atributo name e ou id;
      Ser descendentes de um elemento <form>;
      O formulário para ter um botão de envio.

func (*GlobalAttributes) SetAutofocus

func (e *GlobalAttributes) SetAutofocus(autofocus bool) (ref *GlobalAttributes)

SetAutofocus

English:

This Boolean attribute specifies that the button should have input focus when the page loads.
Only one element in a document can have this attribute.

Português:

Este atributo booleano especifica que o botão deve ter foco de entrada quando a página for
carregada. Apenas um elemento em um documento pode ter esse atributo.

func (*GlobalAttributes) SetButtonType

func (e *GlobalAttributes) SetButtonType(value ButtonType) (ref *GlobalAttributes)

SetButtonType

English:

The default behavior of the button.

 Input:
   value: default behavior of the button.
     KButtonTypeSubmit: The button submits the form data to the server. This is the default if
       the attribute is not specified for buttons associated with a <form>, or if the attribute
       is an empty or invalid value.
     KButtonTypeReset:  The button resets all the controls to their initial values, like
       <input type="reset">. (This behavior tends to annoy users.)
     KButtonTypeButton: The button has no default behavior, and does nothing when pressed by
       default. It can have client-side scripts listen to the element's events, which are
       triggered when the events occur.

Português:

O comportamento padrão do botão. Os valores possíveis são:

 Entrada:
   value: comportamento padrão do botão
     KButtonTypeSubmit: O botão envia os dados do formulário para o servidor. Este é o padrão se
       o atributo não for especificado para botões associados a um <form> ou se o atributo for um
       valor vazio ou inválido.
     KButtonTypeReset:  O botão redefine todos os controles para seus valores iniciais, como
       <input type="reset">. (Esse comportamento tende a incomodar os usuários.)
     KButtonTypeButton: O botão não tem comportamento padrão e não faz nada quando pressionado por
       padrão. Ele pode fazer com que os scripts do lado do cliente escutem os eventos do
       elemento, que são acionados quando os eventos ocorrem.

func (*GlobalAttributes) SetCapture

func (e *GlobalAttributes) SetCapture(capture string) (ref *GlobalAttributes)

SetCapture

English:

Introduced in the HTML Media Capture specification and valid for the file input type only, the
capture attribute defines which media—microphone, video, or camera—should be used to capture a
new file for upload with file upload control in supporting scenarios.

Português:

Introduzido na especificação HTML Media Capture e válido apenas para o tipo de entrada de arquivo,
o atributo capture define qual mídia—microfone, vídeo ou câmera—deve ser usada para capturar um
novo arquivo para upload com controle de upload de arquivo em cenários de suporte.

func (*GlobalAttributes) SetCharset

func (e *GlobalAttributes) SetCharset(value string) (ref *GlobalAttributes)

SetCharset

English:

Space-separated character encodings the server accepts. The browser uses them in the order in
which they are listed. The default value means the same encoding as the page.
(In previous versions of HTML, character encodings could also be delimited by commas.)

Português:

Codificações de caracteres separados por espaço que o servidor aceita. O navegador os utiliza na
ordem em que estão listados. O valor padrão significa a mesma codificação da página.
(Nas versões anteriores do HTML, as codificações de caracteres também podiam ser delimitadas
por vírgulas.)

func (*GlobalAttributes) SetChecked

func (e *GlobalAttributes) SetChecked(checked bool) (ref *GlobalAttributes)

SetChecked

English:

Valid for both radio and checkbox types, checked is a Boolean attribute. If present on a radio
type, it indicates that the radio button is the currently selected one in the group of same-named
radio buttons. If present on a checkbox type, it indicates that the checkbox is checked by default
(when the page loads).
It does not indicate whether this checkbox is currently checked: if the checkbox's state is
changed, this content attribute does not reflect the change.
(Only the HTMLInputElement's checked IDL attribute is updated.)

 Note:
   * Unlike other input controls, a checkboxes and radio buttons value are only included in the
     submitted data if they are currently checked. If they are, the name and the value(s) of the
     checked controls are submitted.
     For example, if a checkbox whose name is fruit has a value of cherry, and the checkbox is
     checked, the form data submitted will include fruit=cherry. If the checkbox isn't active,
     it isn't listed in the form data at all. The default value for checkboxes and radio buttons
     is on.

Português:

Válido para os tipos de rádio e caixa de seleção, marcado é um atributo booleano. Se estiver
presente em um tipo de rádio, indica que o botão de opção é o selecionado atualmente no grupo de
botões de opção com o mesmo nome. Se estiver presente em um tipo de caixa de seleção, indica que
a caixa de seleção está marcada por padrão (quando a página é carregada). Não indica se esta caixa
de seleção está marcada no momento: se o estado da caixa de seleção for alterado, esse atributo
de conteúdo não reflete a alteração.
(Apenas o atributo IDL verificado do HTMLInputElement é atualizado.)

 Nota:
   * Ao contrário de outros controles de entrada, um valor de caixas de seleção e botões de opção
     só são incluídos nos dados enviados se estiverem marcados no momento. Se estiverem, o nome e
     o(s) valor(es) dos controles verificados são enviados.
     Por exemplo, se uma caixa de seleção cujo nome é fruta tiver o valor cereja e a caixa de
     seleção estiver marcada, os dados do formulário enviados incluirão fruta=cereja.
     Se a caixa de seleção não estiver ativa, ela não está listada nos dados do formulário.
     O valor padrão para caixas de seleção e botões de opção é ativado.

func (*GlobalAttributes) SetClass

func (e *GlobalAttributes) SetClass(class ...string) (ref *GlobalAttributes)

SetClass

English:

The class attribute specifies one or more class names for an element.

 Input:
   classname: Specifies one or more class names for an element. To specify multiple classes,
              separate the class names with a space, e.g. <span class="left important">.
              This allows you to combine several CSS classes for one HTML element.

              Naming rules:
                Must begin with a letter A-Z or a-z;
                Can be followed by: letters (A-Za-z), digits (0-9), hyphens ("-"), and
                underscores ("_").

The class attribute is mostly used to point to a class in a style sheet. However, it can also be used by a JavaScript (via the HTML DOM) to make changes to HTML elements with a specified class.

Português:

O atributo class especifica um ou mais nomes de classe para um elemento.

 Entrada:
   classname: Especifica um ou mais nomes de classe para um elemento. Para especificar várias
              classes, separe os nomes das classes com um espaço, por exemplo <span class="left
              important">.
              Isso permite combinar várias classes CSS para um elemento HTML.

              Regras de nomenclatura:
                Deve começar com uma letra A-Z ou a-z;
                Pode ser seguido por: letras (A-Za-z), dígitos (0-9), hífens ("-") e
                sublinhados ("_").

O atributo class é usado principalmente para apontar para uma classe em uma folha de estilo. No entanto, também pode ser usado por um JavaScript (através do HTML DOM) para fazer alterações em elementos HTML com uma classe especificada.

func (*GlobalAttributes) SetContentEditable

func (e *GlobalAttributes) SetContentEditable(editable bool) (ref *GlobalAttributes)

SetContentEditable

English:

The contentEditable attribute specifies whether the content of an element is editable or not.

 Input:
   contentEditable: specifies whether the content of an element is editable or not

 Note:
   When the contentEditable attribute is not set on an element, the element will inherit it from
   its parent.

Português:

O atributo contentEditable especifica se o conteúdo de um elemento é editável ou não.

 Entrada:
   contentEditable: especifica se o conteúdo de um elemento é editável ou não.

 Nota:
   Quando o atributo contentEditable não está definido em um elemento, o elemento o herdará de
   seu pai.

func (*GlobalAttributes) SetCssController

func (e *GlobalAttributes) SetCssController(value *css.Class) (ref *GlobalAttributes)

SetCssController

English:

Add the css classes to the created element.

 Input:
   value: object pointer to css.Class initialized

 Note:
   * This function is equivalent to css.SetList("current", classes...)
   * Css has a feature that allows you to easily change the list of css classes of an html tag,
     with the functions SetList(), CssToggle() and CssToggleTime();
   * Is the equivalent of <... css="name1 name2 nameN">

Português:

Adiciona as classes css ao elemento criado.

 Entrada:
   classes: lista de classes css.

 Nota:
   * Esta função equivale a SetList("current", classes...);
   * Css tem uma funcionalidade que permite trocar a lista de classes css de uma tag html de forma
     fácil, com as funções SetList(), CssToggle() e CssToggleTime();
   * Equivale a <... css="name1 name2 nameN">

func (*GlobalAttributes) SetCustomScheme

func (e *GlobalAttributes) SetCustomScheme(scheme, url string) (ref *GlobalAttributes)

SetCustomScheme

English:

A string containing the permitted scheme for the protocol that the site wishes to handle.
For example, you can register to handle SMS text message links by passing the "sms" scheme.

 Input:
   scheme: A string containing the permitted scheme for the protocol that the site wishes to
           handle. For example, you can register to handle SMS text message links by passing the
           "sms" scheme;
   url:    A string containing the URL of the handler. This URL must include %s, as a placeholder
           that will be replaced with the escaped URL to be handled.

 Secure context:
   * This feature is available only in secure contexts (HTTPS), in some or all supporting
     browsers.

The Navigator method registerProtocolHandler() lets websites register their ability to open or handle particular URL schemes (aka protocols).

For example, this API lets webmail sites open mailto: URLs, or VoIP sites open tel: URLs.

For security reasons, registerProtocolHandler() restricts which schemes can be registered.

Note:
  * A custom scheme may be registered as long as:
    * The custom scheme's name begins with web+
    * The custom scheme's name includes at least 1 letter after the web+ prefix
    * The custom scheme has only lowercase ASCII letters in its name.

Português:

Uma string contendo o esquema permitido para o protocolo que o site deseja manipular. Por exemplo,
você pode se registrar para lidar com links de mensagens de texto SMS passando o esquema "sms".

 Entrada:
   scheme: Uma string contendo o esquema permitido para o protocolo que o site deseja manipular.
           Por exemplo, você pode se registrar para lidar com links de mensagens de texto SMS
           passando o esquema "sms";
   url:    Uma string contendo o URL do manipulador. Este URL deve incluir %s, como um marcador
           de posição que será substituído pelo URL de escape a ser tratado.

 Contexto seguro:
   * Esse recurso está disponível apenas em contextos seguros (HTTPS), em alguns ou em todos os
     navegadores compatíveis.

O método do Navigator registerProtocolHandler() permite que os sites registrem sua capacidade de abrir ou manipular determinados esquemas de URL (também conhecidos como protocolos).

Por exemplo, esta API permite que sites de webmail abram mailto: URLs ou sites VoIP abram tel: URLs.

Por motivos de segurança, registerProtocolHandler() restringe quais esquemas podem ser registrados.

Nota:
  * A custom scheme may be registered as long as:
    * O nome dos esquemas personalizados começa com web+
    * O nome do esquema personalizado inclui pelo menos 1 letra após o prefixo web+
    * O esquema personalizado tem apenas letras ASCII minúsculas em seu nome.

func (*GlobalAttributes) SetData

func (e *GlobalAttributes) SetData(data map[string]string) (ref *GlobalAttributes)

SetData

English:

Used to store custom data private to the page or application.

 Input:
   data: custom data private to the page or application.

The data-* attributes is used to store custom data private to the page or application. The data-* attributes gives us the ability to embed custom data attributes on all HTML elements. The stored (custom) data can then be used in the page's JavaScript to create a more engaging user experience (without any Ajax calls or server-side database queries).

The data-* attributes consist of two parts:

The attribute name should not contain any uppercase letters, and must be at least one character
long after the prefix "data-";
The attribute value can be any string.

Note:
  * Custom attributes prefixed with "data-" will be completely ignored by the user agent.

Português:

Usado para armazenar dados personalizados privados para a página ou aplicativo.

 Entrada:
   data: dados personalizados privados para a página ou aplicativo.

Os atributos de dados são usados para armazenar dados personalizados privados para a página ou aplicativo; Os atributos de dados nos dão a capacidade de incorporar atributos de dados personalizados em todos os elementos HTML; Os dados armazenados (personalizados) podem ser usados no JavaScript da página para criar uma experiência de usuário mais envolvente (sem chamadas Ajax ou consultas de banco de dados do lado do servidor).

Os atributos de dados consistem em duas partes:

O nome do atributo não deve conter letras maiúsculas e deve ter pelo menos um caractere após o
prefixo "data-";
O valor do atributo pode ser qualquer string.

Nota:
  * Atributos personalizados prefixados com "data-" serão completamente ignorados pelo agente do
    usuário.

func (*GlobalAttributes) SetDir

func (e *GlobalAttributes) SetDir(dir Dir) (ref *GlobalAttributes)

SetDir

English:

Specifies the text direction for the content in an element.

 Input:
   dir: direction for the content in an element. [ KDirLeftToRight | KDirRightToLeft | KDirAuto ]

Português:

Especifica a direção do texto para o conteúdo em um elemento.

 Entrada:
   dir: direção do texto para o conteúdo em um elemento. [ KDirLeftToRight | KDirRightToLeft |
        KDirAuto ]

func (*GlobalAttributes) SetDirName

func (e *GlobalAttributes) SetDirName(dirname string) (ref *GlobalAttributes)

SetDirName

English:

Valid for text and search input types only, the dirname attribute enables the submission of the
directionality of the element. When included, the form control will submit with two name/value
pairs: the first being the name and value, the second being the value of the dirname as the name
with the value of ltr or rtl being set by the browser.

Português:

Válido apenas para tipos de entrada de texto e pesquisa, o atributo dirname permite o envio da
direcionalidade do elemento. Quando incluído, o controle de formulário será enviado com dois pares
nomevalor: o primeiro sendo o nome e o valor, o segundo sendo o valor do dirname como o nome com o
valor de ltr ou rtl sendo definido pelo navegador.

func (*GlobalAttributes) SetDisabled

func (e *GlobalAttributes) SetDisabled(disabled bool) (ref *GlobalAttributes)

SetDisabled

English:

Este atributo booleano impede que o usuário interaja com o elemento.

Português:

Este atributo booleano impede que o usuário interaja com o elemento.

func (*GlobalAttributes) SetDownload

func (e *GlobalAttributes) SetDownload(download string) (ref *GlobalAttributes)

SetDownload

English:

Causes the browser to treat the linked URL as a download. Can be used with or without a value

 Note:
   * Without a value, the browser will suggest a filename/extension, generated from various
     sources:
       The Content-Disposition HTTP header;
       The final segment in the URL path;
       The media type (from the Content-Type header, the start of a data: URL, or Blob.type for a
       blob: URL).
   * Defining a value suggests it as the filename. / and \ characters are converted to
     underscores (_). Filesystems may forbid other characters in filenames, so browsers will
     adjust the suggested name if necessary;
   * Download only works for same-origin URLs, or the blob: and data: schemes;
   * How browsers treat downloads varies by browser, user settings, and other factors. The user
     may be prompted before a download starts, or the file may be saved automatically, or it may
     open automatically, either in an external application or in the browser itself;
   * If the Content-Disposition header has different information from the download attribute,
     resulting behavior may differ:
       * If the header specifies a filename, it takes priority over a filename specified in the
         download attribute;
       * If the header specifies a disposition of inline, Chrome and Firefox prioritize the
         attribute and treat it as a download. Old Firefox versions (before 82) prioritize the
         header and will display the content inline.

Português:

Faz com que o navegador trate a URL vinculada como um download. Pode ser usado com ou sem valor

 Nota:
   * Sem um valor, o navegador sugerirá uma extensão de nome de arquivo, gerada a partir de várias
     fontes:
       O cabeçalho HTTP Content-Disposition;
       O segmento final no caminho do URL;
       O tipo de mídia (do cabeçalho Content-Type, o início de um data: URL ou Blob.type para um
       blob: URL).
   * Definir um valor sugere-o como o nome do arquivo. / e \ caracteres são convertidos em
     sublinhados (_). Os sistemas de arquivos podem proibir outros caracteres em nomes de
     arquivos, portanto, os navegadores ajustarão o nome sugerido, se necessário;
   * O download funciona apenas para URLs de mesma origem, ou os esquemas blob: e data: schemes;
   * A forma como os navegadores tratam os downloads varia de acordo com o navegador, as
     configurações do usuário e outros fatores. O usuário pode ser avisado antes do início de um
     download, ou o arquivo pode ser salvo automaticamente, ou pode ser aberto automaticamente,
     seja em um aplicativo externo ou no próprio navegador;
   * Se o cabeçalho Content-Disposition tiver informações diferentes do atributo download, o
     comportamento resultante pode ser diferente:
       * Se o cabeçalho especificar um nome de arquivo, ele terá prioridade sobre um nome de
         arquivo especificado no atributo download;
       * Se o cabeçalho especificar uma disposição de inline, o Chrome e o Firefox priorizarão o
         atributo e o tratarão como um download. Versões antigas do Firefox (antes de 82)
         priorizam o cabeçalho e exibirão o conteúdo inline.

func (*GlobalAttributes) SetDraggable

func (e *GlobalAttributes) SetDraggable(draggable Draggable) (ref *GlobalAttributes)

SetDraggable

English:

Specifies whether an element is draggable or not.

 Input:
   draggable: element is draggable or not. [ KDraggableYes | KDraggableNo | KDraggableAuto ]

The draggable attribute specifies whether an element is draggable or not.

Note:
  * Links and images are draggable by default;
  * The draggable attribute is often used in drag and drop operations.
  * Read our HTML Drag and Drop tutorial to learn more.
    https://www.w3schools.com/html/html5_draganddrop.asp

Português:

Especifica se um elemento pode ser arrastado ou não. [ KDraggableYes | KDraggableNo |
KDraggableAuto ]

 Entrada:
   draggable: elemento é arrastável ou não.

O atributo arrastável especifica se um elemento é arrastável ou não.

Nota:
  * Links e imagens podem ser arrastados por padrão;
  * O atributo arrastável é frequentemente usado em operações de arrastar e soltar.
  * Leia nosso tutorial de arrastar e soltar HTML para saber mais.
    https://www.w3schools.com/html/html5_draganddrop.asp

func (*GlobalAttributes) SetFor

func (e *GlobalAttributes) SetFor(value string) (ref *GlobalAttributes)

SetFor

English:

The value of the for attribute must be a single id for a labelable form-related element in the
same document as the <label> element. So, any given label element can be associated with only
one form control.

 Note:
   * To programmatically set the for attribute, use htmlFor.

The first element in the document with an id attribute matching the value of the for attribute is the labeled control for this label element — if the element with that id is actually a labelable element. If it is not a labelable element, then the for attribute has no effect. If there are other elements that also match the id value, later in the document, they are not considered.

Multiple label elements can be given the same value for their for attribute; doing so causes the associated form control (the form control that for value references) to have multiple labels.

Note:
  * A <label> element can have both a for attribute and a contained control element, as long as
    the for attribute points to the contained control element.

Português:

O valor do atributo for deve ser um único id para um elemento rotulável relacionado ao formulário
no mesmo documento que o elemento <label>. Portanto, qualquer elemento de rótulo pode ser
associado a apenas um controle de formulário.

 Nota:
   * Programaticamente definir o atributo for, use htmlFor.

O primeiro elemento no documento com um atributo id correspondente ao valor do atributo é o controle rotulado para este elemento label - se o elemento com esse ID é realmente um elemento labelable. Se não é um elemento labelable, em seguida, o atributo for tem nenhum efeito. Se existem outros elementos que também correspondem ao valor id, mais adiante no documento, eles não são considerados.

Vários elementos de rótulo podem receber o mesmo valor para seu atributo for; isso faz com que o controle de formulário associado (o controle de formulário para referências de valor) tenha vários rótulos.

Nota:
  * Um elemento <label> pode ter um atributo for e um elemento de controle contido, desde que
    o atributo for aponte para o elemento de controle contido.

func (*GlobalAttributes) SetForm

func (e *GlobalAttributes) SetForm(form string) (ref *GlobalAttributes)

SetForm

English:

The <form> element to associate the button with (its form owner). The value of this attribute must
be the id of a <form> in the same document. (If this attribute is not set, the <button> is
associated with its ancestor <form> element, if any.)

This attribute lets you associate <button> elements to <form>s anywhere in the document, not just inside a <form>. It can also override an ancestor <form> element.

Português:

O elemento <form> ao qual associar o botão (seu proprietário do formulário). O valor deste
atributo deve ser o id de um <form> no mesmo documento. (Se esse atributo não for definido, o
<button> será associado ao elemento <form> ancestral, se houver.)

Este atributo permite associar elementos <button> a <form>s em qualquer lugar do documento, não apenas dentro de um <form>. Ele também pode substituir um elemento <form> ancestral.

func (*GlobalAttributes) SetFormAction

func (e *GlobalAttributes) SetFormAction(action string) (ref *GlobalAttributes)

SetFormAction

English:

A string indicating the URL to which to submit the data. This takes precedence over the action
attribute on the <form> element that owns the <input>.

This attribute is also available on <input type="image"> and <button> elements.

Português:

Uma string indicando o URL para o qual enviar os dados. Isso tem precedência sobre o atributo
action no elemento <form> que possui o <input>.

Este atributo também está disponível nos elementos <input type="image"> e <button>.

func (*GlobalAttributes) SetFormEncType

func (e *GlobalAttributes) SetFormEncType(formenctype FormEncType) (ref *GlobalAttributes)

SetFormEncType

English:

If the button is a submit button (it's inside/associated with a <form> and doesn't have
type="button"), specifies how to encode the form data that is submitted. Possible values:

 Input:
   formenctype: specifies how to encode the form data

     application/x-www-form-urlencoded: The default if the attribute is not used.
     multipart/form-data: Use to submit <input> elements with their type attributes set to file.
     text/plain: Specified as a debugging aid; shouldn't be used for real form submission.

 Note:
   * If this attribute is specified, it overrides the enctype attribute of the button's form
     owner.

Português:

Se o botão for um botão de envio (está associado a um <form> e não possui type="button"),
especifica como codificar os dados do formulário que são enviados. Valores possíveis:

 Entrada:
   formenctype: especifica como codificar os dados do formulário

     KFormEncTypeApplication: O padrão se o atributo não for usado.
     KFormEncTypeMultiPart: Use para enviar elementos <input> com seus atributos de tipo definidos
       para arquivo.
     KFormEncTypeText: Especificado como auxiliar de depuração; não deve ser usado para envio de
       formulário real.

 Note:
   * Se este atributo for especificado, ele substituirá o atributo enctype do proprietário do
     formulário do botão.

func (*GlobalAttributes) SetFormMethod

func (e *GlobalAttributes) SetFormMethod(method FormMethod) (ref *GlobalAttributes)

SetFormMethod

English:

If the button is a submit button (it's inside/associated with a <form> and doesn't have
type="button"), this attribute specifies the HTTP method used to submit the form.

 Input:
   method: specifies the HTTP method used to submit
     KFormMethodPost: The data from the form are included in the body of the HTTP request when
       sent to the server. Use when the form contains information that shouldn't be public, like
       login credentials;
     KFormMethodGet: The form data are appended to the form's action URL, with a ? as a separator,
       and the resulting URL is sent to the server. Use this method when the form has no side
       effects, like search forms;
     KFormMethodDialog: When the form is inside a <dialog>, closes the dialog and throws a submit
       event on submission without submitting data or clearing the form.

 Note:
   * If specified, this attribute overrides the method attribute of the button's form owner.

Português:

Se o botão for um botão de envio (está associado a um <form> e não possui type="button"),
este atributo especifica o método HTTP usado para enviar o formulário.

 Input:
   method: especifica o método HTTP usado para enviar
     KFormMethodPost: Os dados do formulário são incluídos no corpo da solicitação HTTP quando
       enviados ao servidor. Use quando o formulário contém informações que não devem ser
       públicas, como credenciais de login;
     KFormMethodGet: Os dados do formulário são anexados à URL de ação do formulário, com um ?
       como separador e a URL resultante é enviada ao servidor. Use este método quando o
       formulário não tiver efeitos colaterais, como formulários de pesquisa;
     KFormMethodDialog: Quando o formulário está dentro de um <dialog>, fecha o diálogo e lança um
       evento submit no envio sem enviar dados ou limpar o formulário.

 Nota:
   * Se especificado, este atributo substitui o atributo method do proprietário do formulário do
     botão.

func (*GlobalAttributes) SetFormNovalidate

func (e *GlobalAttributes) SetFormNovalidate(novalidate string) (ref *GlobalAttributes)

SetFormNovalidate

English:

This Boolean attribute indicates that the form shouldn't be validated when submitted.

If this attribute is not set (and therefore the form is validated), it can be overridden by a formnovalidate attribute on a <button>, <input type="submit">, or <input type="image"> element belonging to the form.

Português:

Este atributo booleano indica que o formulário não deve ser validado quando enviado.

Se este atributo não estiver definido (e, portanto, o formulário for validado), ele poderá ser substituído por um atributo formnovalidate em um elemento <button>, <input type="submit"> ou <input type="image"> pertencente a a forma.

func (*GlobalAttributes) SetFormTarget

func (e *GlobalAttributes) SetFormTarget(formtarget Target) (ref *GlobalAttributes)

SetFormTarget

English:

If the button is a submit button, this attribute is an author-defined name or standardized,
underscore-prefixed keyword indicating where to display the response from submitting the form.

This is the name of, or keyword for, a browsing context (a tab, window, or <iframe>). If this attribute is specified, it overrides the target attribute of the button's form owner. The following keywords have special meanings:

KTargetSelf: the current browsing context; (Default)
KTargetBlank: usually a new tab, but users can configure browsers to open a new window instead;
KTargetParent: the parent browsing context of the current one. If no parent, behaves as _self;
KTargetTop: the topmost browsing context (the "highest" context that's an ancestor of the current
  one). If no ancestors, behaves as _self.

Português:

Se o botão for um botão de envio, esse atributo será um nome definido pelo autor ou uma
palavra-chave padronizada com prefixo de sublinhado indicando onde exibir a resposta do envio do
formulário.

Este é o nome ou a palavra-chave de um contexto de navegação (uma guia, janela ou <iframe>). Se este atributo for especificado, ele substituirá o atributo de destino do proprietário do formulário do botão. As seguintes palavras-chave têm significados especiais:

KTargetSelf: o contexto de navegação atual; (padrão)
KTargetBlank: geralmente uma nova guia, mas os usuários podem configurar os navegadores para
  abrir uma nova janela;
KTargetParent: o contexto de navegação pai do atual. Se nenhum pai, se comporta como _self;
KTargetTop: o contexto de navegação mais alto (o contexto "mais alto" que é um ancestral do
  atual). Se não houver ancestrais, se comporta como _self.

func (*GlobalAttributes) SetFormValidate

func (e *GlobalAttributes) SetFormValidate(validate bool) (ref *GlobalAttributes)

SetFormValidate

English:

If the button is a submit button, this Boolean attribute specifies that the form is not to be
validated when it is submitted.

If this attribute is specified, it overrides the novalidate attribute of the button's form owner.

Português:

Se o botão for um botão de envio, este atributo booleano especifica que o formulário não deve ser
validado quando for enviado.

Se este atributo for especificado, ele substituirá o atributo novalidate do proprietário do formulário do botão.

func (*GlobalAttributes) SetFromAction

func (e *GlobalAttributes) SetFromAction(action string) (ref *GlobalAttributes)

SetFromAction

English:

The URL that processes the information submitted by the button. Overrides the action attribute of
the button's form owner. Does nothing if there is no form owner.

 Input:
   action: The URL that processes the form submission. This value can be overridden by a
           formaction attribute on a <button>, <input type="submit">, or <input type="image">
           element. This attribute is ignored when method="dialog" is set.

Português:

A URL que processa as informações enviadas pelo botão. Substitui o atributo de ação do
proprietário do formulário do botão. Não faz nada se não houver um proprietário de formulário.

 Entrada:
   action: A URL que processa o envio do formulário. Esse valor pode ser substituído por um
           atributo formaction em um elemento <button>, <input type="submit"> ou
           <input type="image">. Este atributo é ignorado quando method="dialog" é definido.

func (*GlobalAttributes) SetHRef

func (e *GlobalAttributes) SetHRef(href string) (ref *GlobalAttributes)

SetHRef

English:

The URL that the hyperlink points to. Links are not restricted to HTTP-based URLs — they can use
any URL scheme supported by browsers:
  * Sections of a page with fragment URLs;
  * Pieces of media files with media fragments;
  * Telephone numbers with tel: URLs;
  * Email addresses with mailto: URLs;
  * While web browsers may not support other URL schemes, web sites can with
    registerProtocolHandler().

Português:

A URL para a qual o hiperlink aponta. Os links não são restritos a URLs baseados em HTTP — eles
podem usar qualquer esquema de URL suportado pelos navegadores:
  * Seções de uma página com URLs de fragmento;
  * Pedaços de arquivos de mídia com fragmentos de mídia;
  * Números de telefone com tel: URLs;
  * Endereços de e-mail com mailto: URLs;
  * Embora os navegadores da Web possam não suportar outros esquemas de URL, os sites da Web podem
    com registerProtocolHandler().

func (*GlobalAttributes) SetHRefLang

func (e *GlobalAttributes) SetHRefLang(hreflang string) (ref *GlobalAttributes)

SetHRefLang

English:

Hints at the human language of the linked URL. No built-in functionality. Allowed values are the
same as the global lang attribute.

Português:

Dicas para a linguagem humana da URL vinculada. Nenhuma funcionalidade embutida. Os valores
permitidos são os mesmos do atributo lang global.

func (*GlobalAttributes) SetHeight

func (e *GlobalAttributes) SetHeight(height int) (ref *GlobalAttributes)

SetHeight

English:

The height is the height of the image file to display to represent the graphical submit button.

Português:

A altura é a altura do arquivo de imagem a ser exibido para representar o botão de envio gráfico.

func (*GlobalAttributes) SetHidden

func (e *GlobalAttributes) SetHidden() (ref *GlobalAttributes)

SetHidden

English:

Specifies that an element is not yet, or is no longer, relevant.

 Input:
   hidden:

The hidden attribute is a boolean attribute.

When present, it specifies that an element is not yet, or is no longer, relevant.

Browsers should not display elements that have the hidden attribute specified.

The hidden attribute can also be used to keep a user from seeing an element until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript could remove the hidden attribute, and make the element visible.

Português:

Especifica que um elemento ainda não é ou não é mais relevante.

O atributo oculto é um atributo booleano.

Quando presente, especifica que um elemento ainda não é ou não é mais relevante.

Os navegadores não devem exibir elementos que tenham o atributo oculto especificado.

O atributo oculto também pode ser usado para impedir que um usuário veja um elemento até que alguma outra condição seja atendida (como marcar uma caixa de seleção etc.). Então, um JavaScript pode remover o atributo oculto e tornar o elemento visível.

func (*GlobalAttributes) SetId

func (e *GlobalAttributes) SetId(id string) (ref *GlobalAttributes)

SetId

English:

Specifies a unique id for an element

The id attribute specifies a unique id for an HTML element (the value must be unique within the HTML document).

The id attribute is most used to point to a style in a style sheet, and by JavaScript (via the HTML DOM) to manipulate the element with the specific id.

Português:

Especifica um ID exclusivo para um elemento

O atributo id especifica um id exclusivo para um elemento HTML (o valor deve ser exclusivo no documento HTML).

O atributo id é mais usado para apontar para um estilo em uma folha de estilo, e por JavaScript (através do HTML DOM) para manipular o elemento com o id específico.

func (*GlobalAttributes) SetInnerHtml

func (e *GlobalAttributes) SetInnerHtml(html string) (ref *GlobalAttributes)

SetInnerHtml

English:

The Element property GetInnerHtml() / SetInnerHtml() gets or sets the HTML or XML markup contained
within the element.

To insert the HTML into the document rather than replace the contents of an element, use the method InsertAdjacentHtml().

Value: A DOMString containing the HTML serialization of the element's descendants.

Note:
  * Setting the value of SetInnerHtml() removes all of the element's descendants and replaces
    them with nodes constructed by parsing the HTML given in the string htmlString.

SyntaxError DOMException

Thrown if an attempt was made to set the value of innerHTML using a string which is not properly-formed HTML.

NoModificationAllowedError DOMException

Thrown if an attempt was made to insert the HTML into a node whose parent is a Document.

Usage notes

The innerHTML property can be used to examine the current HTML source of the page, including any changes that have been made since the page was initially loaded.

Reading the HTML contents of an element

Reading GetInnerHtml() causes the user agent to serialize the HTML or XML fragment comprised of the element's descendants. The resulting string is returned.

Note:
  * The returned HTML or XML fragment is generated based on the current contents of the element,
    so the markup and formatting of the returned fragment is likely not to match the original
    page markup.

Replacing the contents of an element

Setting the value of SetInnerHtml() lets you easily replace the existing contents of an element with new content.

Note:
  * This is a security risk if the string to be inserted might contain potentially malicious
    content. When inserting user-supplied data you should always consider using SetInnerHtml()
    instead, in order to sanitize the content before it is inserted.

Português:

A propriedade Element GetInnerHtml() / SetInnerHtml() obtém ou define a marcação HTML ou XML
contida no elemento.

Para inserir o HTML no documento em vez de substituir o conteúdo de um elemento, use o método InsertAdjacentHtml().

Valor: Um DOMString contendo a serialização HTML dos descendentes do elemento.

Nota:
  * Definir o valor de SetInnerHtml() remove todos os descendentes do elemento e os substitui por
    nós construídos analisando o HTML fornecido na string htmlString.

SyntaxError DOMException

Lançado se foi feita uma tentativa de definir o valor de innerHTML usando uma string que não é HTML corretamente formada.

NoModificationAllowedError DOMException

Lançado se foi feita uma tentativa de inserir o HTML em um nó cujo pai é um Documento.

Notas de uso

A propriedade innerHTML pode ser usada para examinar a fonte HTML atual da página, incluindo quaisquer alterações feitas desde que a página foi carregada inicialmente.

Lendo o conteúdo HTML de um elemento

A leitura de GetInnerHtml() faz com que o agente do usuário serialize o fragmento HTML ou XML composto pelos descendentes do elemento. A string resultante é retornada.

Nota:
  * O fragmento HTML ou XML retornado é gerado com base no conteúdo atual do elemento, portanto,
    a marcação e a formatação do fragmento retornado provavelmente não corresponderão à marcação
    da página original.

Substituindo o conteúdo de um elemento

Definir o valor de SetInnerHtml() permite substituir facilmente o conteúdo existente de um elemento por um novo conteúdo.

Nota:
  * Este é um risco de segurança se a string a ser inserida puder conter conteúdo potencialmente
    mal-intencionado. Ao inserir dados fornecidos pelo usuário, você deve sempre considerar o uso
    de SetInnerHtml(), para limpar o conteúdo antes de ser inserido.

func (*GlobalAttributes) SetInnerText

func (e *GlobalAttributes) SetInnerText(text string) (ref *GlobalAttributes)

SetInnerText

English:

The innerText property of the HTMLElement interface represents the rendered text content of a node
and its descendants.

As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. As a setter this will replace the element's children with the given value, converting any line breaks into <br> elements.

Note:
  * SetInnerText() is easily confused with SetTextContent(), but there are important differences
    between the two:
    Basically, SetInnerText() is aware of the rendered appearance of text, while SetTextContent()
    is not.

Value: A DOMString representing the rendered text content of an element.

If the element itself is not being rendered (for example, is detached from the document or is hidden from view), the returned value is the same as the GetTextContent() property.

Português:

A propriedade innerText da interface HTMLElement representa o conteúdo de texto renderizado de um
nó e seus descendentes.

Como um getter, ele aproxima o texto que o usuário obteria se destacasse o conteúdo do elemento com o cursor e o copiasse para a área de transferência. Como um setter, isso substituirá os filhos do elemento pelo valor fornecido, convertendo qualquer quebra de linha em elementos <br>.

Nota:
  * SetInnerText() é facilmente confundido com SetTextContent(), mas existem diferenças
    importantes entre os dois:
    Basicamente, SetInnerText() está ciente da aparência renderizada do texto, enquanto
    SetTextContent() não.

Valor: Um DOMString que representa o conteúdo de texto renderizado de um elemento.

Se o próprio elemento não estiver sendo renderizado (por exemplo, estiver desanexado do documento ou estiver oculto da exibição), o valor retornado será o mesmo que a propriedade GetTextContent().

func (*GlobalAttributes) SetInputAccept

func (e *GlobalAttributes) SetInputAccept(accept string) (ref *GlobalAttributes)

SetInputAccept

English:

Valid for the file input type only, the accept attribute defines which file types are selectable
in a file upload control. See the file input type.

Português:

Válido apenas para o tipo de entrada de arquivo, o atributo accept define quais tipos de arquivo
são selecionáveis em um controle de upload de arquivo. Consulte o tipo de entrada do arquivo.

func (*GlobalAttributes) SetInputType

func (e *GlobalAttributes) SetInputType(inputType InputType) (ref *GlobalAttributes)

SetInputType

English:

How an <input> works varies considerably depending on the value of its type attribute, hence the
different types are covered in their own separate reference pages.

If this attribute is not specified, the default type adopted is text.

Português:

Como um <input> funciona varia consideravelmente dependendo do valor de seu atributo type,
portanto, os diferentes tipos são abordados em suas próprias páginas de referência separadas.

Se este atributo não for especificado, o tipo padrão adotado é texto.

func (*GlobalAttributes) SetLabel

func (e *GlobalAttributes) SetLabel(label string) (ref *GlobalAttributes)

SetLabel

English:

This attribute is text for the label indicating the meaning of the option. If the label attribute
isn't defined, its value is that of the element text content.

Português:

Este atributo é um texto para o rótulo que indica o significado da opção. Se o atributo label não
estiver definido, seu valor será o do conteúdo do texto do elemento.

func (*GlobalAttributes) SetLang

func (e *GlobalAttributes) SetLang(language Language) (ref *GlobalAttributes)

SetLang

English:

Specifies the language of the element's content.

The lang attribute specifies the language of the element's content.

Common examples are KLanguageEnglish for English, KLanguageSpanish for Spanish, KLanguageFrench for French, and so on.

Português:

Especifica o idioma do conteúdo do elemento.

O atributo lang especifica o idioma do conteúdo do elemento.

Exemplos comuns são KLanguageEnglish para inglês, KLanguageSpanish para espanhol, KLanguageFrench para francês e assim por diante.

func (*GlobalAttributes) SetList

func (e *GlobalAttributes) SetList(list string) (ref *GlobalAttributes)

SetList

English:

The value given to the list attribute should be the id of a <datalist> element located in the same
document.

The <datalist> provides a list of predefined values to suggest to the user for this input. Any values in the list that are not compatible with the type are not included in the suggested options. The values provided are suggestions, not requirements: users can select from this predefined list or provide a different value.

It is valid on text, search, url, tel, email, date, month, week, time, datetime-local, number, range, and color.

Per the specifications, the list attribute is not supported by the hidden, password, checkbox, radio, file, or any of the button types.

Depending on the browser, the user may see a custom color palette suggested, tic marks along a range, or even a input that opens like a <select> but allows for non-listed values. Check out the browser compatibility table for the other input types.

See factoryBrowser.NewTagDataList()

Português:

O valor dado ao atributo list deve ser o id de um elemento <datalist> localizado no mesmo
documento.

O <datalist> fornece uma lista de valores predefinidos para sugerir ao usuário para esta entrada. Quaisquer valores na lista que não sejam compatíveis com o tipo não são incluídos nas opções sugeridas. Os valores fornecidos são sugestões, não requisitos: os usuários podem selecionar dessa lista predefinida ou fornecer um valor diferente.

É válido em texto, pesquisa, url, telefone, email, data, mês, semana, hora, data e hora local, número, intervalo e cor.

De acordo com as especificações, o atributo de lista não é suportado pelo oculto, senha, caixa de seleção, rádio, arquivo ou qualquer um dos tipos de botão.

Dependendo do navegador, o usuário pode ver uma paleta de cores personalizada sugerida, marcas de tique ao longo de um intervalo ou até mesmo uma entrada que abre como um <select>, mas permite valores não listados. Confira a tabela de compatibilidade do navegador para os outros tipos de entrada.

Veja factoryBrowser.NewTagDataList()

func (*GlobalAttributes) SetMax

func (e *GlobalAttributes) SetMax(max int) (ref *GlobalAttributes)

SetMax

English:

Valid for date, month, week, time, datetime-local, number, and range, it defines the greatest
value in the range of permitted values.
If the value entered into the element exceeds this, the element fails constraint validation.
If the value of the max attribute isn't a number, then the element has no maximum value.

There is a special case: if the data type is periodic (such as for dates or times), the value of max may be lower than the value of min, which indicates that the range may wrap around; for example, this allows you to specify a time range from 10 PM to 4 AM.

Português:

Válido para data, mês, semana, hora, datetime-local, número e intervalo, define o maior valor no
intervalo de valores permitidos. Se o valor inserido no elemento exceder isso, o elemento falhará
na validação de restrição. Se o valor do atributo max não for um número, o elemento não terá
valor máximo.

Há um caso especial: se o tipo de dado for periódico (como para datas ou horas), o valor de max pode ser menor que o valor de min, o que indica que o intervalo pode ser contornado; por exemplo, isso permite que você especifique um intervalo de tempo das 22h às 4h.

func (*GlobalAttributes) SetMaxLength

func (e *GlobalAttributes) SetMaxLength(maxlength int) (ref *GlobalAttributes)

SetMaxLength

English:

Valid for text, search, url, tel, email, and password, it defines the maximum number of characters
(as UTF-16 code units) the user can enter into the field. This must be an integer value 0 or
higher. If no maxlength is specified, or an invalid value is specified, the field has no maximum
length. This value must also be greater than or equal to the value of minlength.

The input will fail constraint validation if the length of the text entered into the field is greater than maxlength UTF-16 code units long. By default, browsers prevent users from entering more characters than allowed by the maxlength attribute.

Português:

Válido para texto, pesquisa, url, tel, email e senha, define o número máximo de caracteres
(como unidades de código UTF-16) que o usuário pode inserir no campo.

Este deve ser um valor inteiro 0 ou superior. Se nenhum comprimento máximo for especificado ou um valor inválido for especificado, o campo não terá comprimento máximo. Esse valor também deve ser maior ou igual ao valor de minlength.

A entrada falhará na validação de restrição se o comprimento do texto inserido no campo for maior que o comprimento máximo das unidades de código UTF-16. Por padrão, os navegadores impedem que os usuários insiram mais caracteres do que o permitido pelo atributo maxlength.

func (*GlobalAttributes) SetMimeType

func (e *GlobalAttributes) SetMimeType(typeProperty Mime) (ref *GlobalAttributes)

SetMimeType

English:

Hints at the linked URL's format with a MIME type. No built-in functionality.

Português:

Dicas no formato do URL vinculado com um tipo MIME. Nenhuma funcionalidade embutida.

func (*GlobalAttributes) SetMin

func (e *GlobalAttributes) SetMin(min int) (ref *GlobalAttributes)

SetMin

English:

Valid for date, month, week, time, datetime-local, number, and range, it defines the most negative
value in the range of permitted values.

If the value entered into the element is less than this, the element fails constraint validation. If the value of the min attribute isn't a number, then the element has no minimum value.

This value must be less than or equal to the value of the max attribute. If the min attribute is present but is not specified or is invalid, no min value is applied. If the min attribute is valid and a non-empty value is less than the minimum allowed by the min attribute, constraint validation will prevent form submission. See Client-side validation for more information.

There is a special case: if the data type is periodic (such as for dates or times), the value of max may be lower than the value of min, which indicates that the range may wrap around; for example, this allows you to specify a time range from 10 PM to 4 AM.

Português:

Válido para data, mês, semana, hora, data e hora local, número e intervalo, define o valor mais
negativo no intervalo de valores permitidos.

Se o valor inserido no elemento for menor que isso, o elemento falhará na validação de restrição. Se o valor do atributo min não for um número, o elemento não terá valor mínimo.

Esse valor deve ser menor ou igual ao valor do atributo max. Se o atributo min estiver presente, mas não for especificado ou for inválido, nenhum valor min será aplicado. Se o atributo min for válido e um valor não vazio for menor que o mínimo permitido pelo atributo min, a validação de restrição impedirá o envio do formulário. Consulte Validação do lado do cliente para obter mais informações.

Há um caso especial: se o tipo de dado for periódico (como para datas ou horas), o valor de max pode ser menor que o valor de min, o que indica que o intervalo pode ser contornado; por exemplo, isso permite que você especifique um intervalo de tempo das 22h às 4h.

func (*GlobalAttributes) SetMinLength

func (e *GlobalAttributes) SetMinLength(minlength int) (ref *GlobalAttributes)

SetMinLength

English:

Valid for text, search, url, tel, email, and password, it defines the minimum number of
characters (as UTF-16 code units) the user can enter into the entry field.

This must be an non-negative integer value smaller than or equal to the value specified by maxlength. If no minlength is specified, or an invalid value is specified, the input has no minimum length.

The input will fail constraint validation if the length of the text entered into the field is fewer than minlength UTF-16 code units long, preventing form submission.

Português:

Válido para texto, pesquisa, url, tel, email e senha, define o número mínimo de caracteres
(como unidades de código UTF-16) que o usuário pode inserir no campo de entrada.

Este deve ser um valor inteiro não negativo menor ou igual ao valor especificado por maxlength. Se nenhum comprimento mínimo for especificado ou um valor inválido for especificado, a entrada não terá comprimento mínimo.

A entrada falhará na validação de restrição se o comprimento do texto inserido no campo for inferior a unidades de código UTF-16 de comprimento mínimo, impedindo o envio do formulário.

func (*GlobalAttributes) SetMousePointer

func (e *GlobalAttributes) SetMousePointer(pointer mouse.CursorType) (ref *GlobalAttributes)

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

func (*GlobalAttributes) SetMousePointerAuto

func (e *GlobalAttributes) SetMousePointerAuto() (ref *GlobalAttributes)

SetMousePointerAuto

English:

Sets the mouse pointer to auto.

Português:

Define o ponteiro do mouse como automático.

func (*GlobalAttributes) SetMousePointerHide

func (e *GlobalAttributes) SetMousePointerHide() (ref *GlobalAttributes)

SetMousePointerHide

English:

Sets the mouse pointer to hide.

Português:

Define o ponteiro do mouse como oculto.

func (*GlobalAttributes) SetMultiple

func (e *GlobalAttributes) SetMultiple(multiple bool) (ref *GlobalAttributes)

SetMultiple

English:

This Boolean attribute indicates that multiple options can be selected in the list. If it is not
specified, then only one option can be selected at a time. When multiple is specified, most
browsers will show a scrolling list box instead of a single line dropdown.

Português:

Este atributo booleano indica que várias opções podem ser selecionadas na lista. Se não for
especificado, apenas uma opção pode ser selecionada por vez. Quando vários são especificados, a
maioria dos navegadores mostrará uma caixa de listagem de rolagem em vez de uma lista suspensa
de uma única linha.

func (*GlobalAttributes) SetName

func (e *GlobalAttributes) SetName(name string) (ref *GlobalAttributes)

SetName

English:

The name of the button, submitted as a pair with the button's value as part of the form data,
when that button is used to submit the form.

Português:

O nome do botão, enviado como um par com o valor do botão como parte dos dados do formulário,
quando esse botão é usado para enviar o formulário.

func (*GlobalAttributes) SetNewOption

func (e *GlobalAttributes) SetNewOption(id, label, value string, disabled, selected bool) (ref *GlobalAttributes)

SetNewOption

English:

The <option> HTML element is used to define an item contained in a <select>, an <optgroup>, or
a <datalist> element. As such, <option> can represent menu items in popups and other lists of
items in an HTML document.

 Input:
   id: a unique id for an element;
   label: This attribute is text for the label indicating the meaning of the option. If the label
     attribute isn't defined, its value is that of the element text content;
   value: The content of this attribute represents the value to be submitted with the form, should
     this option be selected. If this attribute is omitted, the value is taken from the text
     content of the option element;
   disabled: If this Boolean attribute is set, this option is not checkable. Often browsers grey
     out such control and it won't receive any browsing event, like mouse clicks or focus-related
     ones. If this attribute is not set, the element can still be disabled if one of its ancestors
     is a disabled <optgroup> element;
   selected: If present, this Boolean attribute indicates that the option is initially selected.
     If the <option> element is the descendant of a <select> element whose multiple attribute is
     not set, only one single <option> of this <select> element may have the selected attribute.

Português:

O elemento HTML <option> é usado para definir um item contido em um elemento <select>, <optgroup>
ou <datalist>. Como tal, <option> pode representar itens de menu em pop-ups e outras listas de
itens em um documento HTML.

 Entrada:
   id: um id exclusivo para um elemento;
   label: Este atributo é um texto para o rótulo que indica o significado da opção. Se o atributo
     label não estiver definido, seu valor será o do conteúdo do texto do elemento;
   value: O conteúdo deste atributo representa o valor a ser enviado com o formulário, caso esta
     opção seja selecionada. Se este atributo for omitido, o valor será obtido do conteúdo de
     texto do elemento de opção;
   disabled: Se este atributo booleano estiver definido, esta opção não poderá ser marcada.
     Muitas vezes, os navegadores desativam esse controle e não recebem nenhum evento de
     navegação, como cliques do mouse ou relacionados ao foco. Se este atributo não for definido,
     o elemento ainda poderá ser desabilitado se um de seus ancestrais for um elemento <optgroup>
     desabilitado;
   selected: Se presente, este atributo booleano indica que a opção foi selecionada inicialmente.
     Se o elemento <option> é descendente de um elemento <select> cujo atributo múltiplo não está
     definido, apenas um único <option> deste elemento <select> pode ter o atributo selecionado.

func (*GlobalAttributes) SetPattern

func (e *GlobalAttributes) SetPattern(pattern string) (ref *GlobalAttributes)

SetPattern

English:

The pattern attribute, when specified, is a regular expression that the input's value must match
in order for the value to pass constraint validation. It must be a valid JavaScript regular
expression, as used by the RegExp type, and as documented in our guide on regular expressions;
the 'u' flag is specified when compiling the regular expression, so that the pattern is treated
as a sequence of Unicode code points, instead of as ASCII. No forward slashes should be specified
around the pattern text.

If the pattern attribute is present but is not specified or is invalid, no regular expression is applied and this attribute is ignored completely. If the pattern attribute is valid and a non-empty value does not match the pattern, constraint validation will prevent form submission.

Note:
  * If using the pattern attribute, inform the user about the expected format by including
    explanatory text nearby. You can also include a title attribute to explain what the
    requirements are to match the pattern; most browsers will display this title as a tooltip.
    The visible explanation is required for accessibility. The tooltip is an enhancement.

Português:

O atributo pattern, quando especificado, é uma expressão regular que o valor da entrada deve
corresponder para que o valor passe na validação de restrição. Deve ser uma expressão regular
JavaScript válida, conforme usada pelo tipo RegExp e conforme documentado em nosso guia sobre
expressões regulares; o sinalizador 'u' é especificado ao compilar a expressão regular, para que
o padrão seja tratado como uma sequência de pontos de código Unicode, em vez de como ASCII.
Nenhuma barra deve ser especificada ao redor do texto do padrão.

Se o atributo pattern estiver presente, mas não for especificado ou for inválido, nenhuma expressão regular será aplicada e esse atributo será completamente ignorado. Se o atributo de padrão for válido e um valor não vazio não corresponder ao padrão, a validação de restrição impedirá o envio do formulário.

Nota:
  * Se estiver usando o atributo pattern, informe o usuário sobre o formato esperado incluindo
    um texto explicativo próximo. Você também pode incluir um atributo title para explicar quais
    são os requisitos para corresponder ao padrão; a maioria dos navegadores exibirá este título
    como uma dica de ferramenta. A explicação visível é necessária para acessibilidade. A dica
    de ferramenta é um aprimoramento.

func (*GlobalAttributes) SetPing

func (e *GlobalAttributes) SetPing(ping ...string) (ref *GlobalAttributes)

SetPing

English:

A space-separated list of URLs. When the link is followed, the browser will send POST requests
with the body PING to the URLs. Typically for tracking.

Português:

Uma lista de URLs separados por espaços. Quando o link for seguido, o navegador enviará
solicitações POST com o corpo PING para as URLs. Normalmente para rastreamento.

func (*GlobalAttributes) SetPlaceholder

func (e *GlobalAttributes) SetPlaceholder(placeholder string) (ref *GlobalAttributes)

SetPlaceholder

English:

The placeholder attribute is a string that provides a brief hint to the user as to what kind of
information is expected in the field. It should be a word or short phrase that provides a hint
as to the expected type of data, rather than an explanation or prompt. The text must not include
carriage returns or line feeds. So for example if a field is expected to capture a user's first
name, and its label is "First Name", a suitable placeholder might be "e.g. Mustafa".

 Note:
   * The placeholder attribute is not as semantically useful as other ways to explain your form,
     and can cause unexpected technical issues with your content. See Labels for more information.

Português:

O atributo placeholder é uma string que fornece uma breve dica ao usuário sobre que tipo de
informação é esperada no campo. Deve ser uma palavra ou frase curta que forneça uma dica sobre o
tipo de dados esperado, em vez de uma explicação ou prompt. O texto não deve incluir retornos de
carro ou feeds de linha. Assim, por exemplo, se espera-se que um campo capture o primeiro nome de
um usuário e seu rótulo for "Nome", um espaço reservado adequado pode ser "por exemplo, Mustafa".

 Nota:
   * O atributo placeholder não é tão semanticamente útil quanto outras formas de explicar seu
     formulário e pode causar problemas técnicos inesperados com seu conteúdo. Consulte Rótulos
     para obter mais informações.

func (*GlobalAttributes) SetReadOnly

func (e *GlobalAttributes) SetReadOnly(readonly bool) (ref *GlobalAttributes)

SetReadOnly

English:

A Boolean attribute which, if present, indicates that the user should not be able to edit the
value of the input.

The readonly attribute is supported by the text, search, url, tel, email, date, month, week, time, datetime-local, number, and password input types.

Português:

A Boolean attribute which, if present, indicates that the user should not be able to edit the value of the input. The readonly attribute is supported by the text, search, url, tel, email, date, month, week, time, datetime-local, number, and password input types.

func (*GlobalAttributes) SetReferrerPolicy

func (e *GlobalAttributes) SetReferrerPolicy(referrerPolicy ReferrerPolicy) (ref *GlobalAttributes)

SetReferrerPolicy

English:

How much of the referrer to send when following the link.

 KRefPolicyNoReferrer: The Referer header will not be sent.
 KRefPolicyNoReferrerWhenDowngrade: The Referer header will not be sent to origins without TLS
   (HTTPS).
 KRefPolicyOrigin: The sent referrer will be limited to the origin of the referring page: its
   scheme, host, and port.
 KRefPolicyOriginWhenCrossOrigin: The referrer sent to other origins will be limited to the
   scheme, the host, and the port. Navigations on the same origin will still include the path.
 KRefPolicySameOrigin: A referrer will be sent for same origin, but cross-origin requests will
   contain no referrer information.
 KRefPolicyStrictOrigin: Only send the origin of the document as the referrer when the protocol
   security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination
   (HTTPS→HTTP).
 KRefPolicyStrictOriginWhenCrossOrigin (default): Send a full URL when performing a same-origin
   request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS),
   and send no header to a less secure destination (HTTPS→HTTP).
 KRefPolicyUnsafeUrl: The referrer will include the origin and the path (but not the fragment,
   password, or username). This value is unsafe, because it leaks origins and paths from
   TLS-protected resources to insecure origins.

 Note:
   * Experimental. Expect behavior to change in the future. (04/2022)

Português:

Quanto do referenciador enviar ao seguir o link.

 KRefPolicyNoReferrer: O cabeçalho Referer não será enviado.
 KRefPolicyNoReferrerWhenDowngrade: O cabeçalho Referer não será enviado para origens sem TLS
   (HTTPS).
 KRefPolicyOrigin: O referenciador enviado será limitado à origem da página de referência: seu
   esquema, host e porta.
 KRefPolicyOriginWhenCrossOrigin: O referenciador enviado para outras origens será limitado ao
   esquema, ao host e à porta. As navegações na mesma origem ainda incluirão o caminho.
 KRefPolicySameOrigin: Um referenciador será enviado para a mesma origem, mas as solicitações de
   origem cruzada não conterão informações de referenciador.
 KRefPolicyStrictOrigin: Só envie a origem do documento como referenciador quando o nível de
   segurança do protocolo permanecer o mesmo (HTTPS→HTTPS), mas não envie para um destino menos
   seguro (HTTPS→HTTP).
 KRefPolicyStrictOriginWhenCrossOrigin (padrão): Envie uma URL completa ao realizar uma
   solicitação de mesma origem, envie a origem apenas quando o nível de segurança do protocolo
   permanecer o mesmo (HTTPS→HTTPS) e não envie nenhum cabeçalho para um destino menos seguro
   (HTTPS→HTTP).
 KRefPolicyUnsafeUrl: O referenciador incluirá a origem e o caminho (mas não o fragmento, a senha
   ou o nome de usuário). Esse valor não é seguro porque vaza origens e caminhos de recursos
   protegidos por TLS para origens inseguras.

 Note:
   * Experimental. Expect behavior to change in the future. (04/2022)

func (*GlobalAttributes) SetRel

func (e *GlobalAttributes) SetRel(rel string) (ref *GlobalAttributes)

SetRel

English:

The relationship of the linked URL as space-separated link types.

Português:

O relacionamento da URL vinculada como tipos de link separados por espaço.

func (*GlobalAttributes) SetRequired

func (e *GlobalAttributes) SetRequired(required bool) (ref *GlobalAttributes)

SetRequired

English:

A Boolean attribute indicating that an option with a non-empty string value must be selected.

Português:

Um atributo booleano que indica que uma opção com um valor de string não vazio deve ser
selecionada.

func (*GlobalAttributes) SetScheme

func (e *GlobalAttributes) SetScheme(scheme Scheme) (ref *GlobalAttributes)

SetScheme

English:

A string containing the permitted scheme for the protocol that the site wishes to handle.
For example, you can register to handle SMS text message links by passing the "sms" scheme.

For security reasons, registerProtocolHandler() restricts which schemes can be registered.

Note:
  * A custom scheme may be registered as long as:
    * The custom scheme's name begins with web+
    * The custom scheme's name includes at least 1 letter after the web+ prefix
    * The custom scheme has only lowercase ASCII letters in its name.

Português:

Uma string contendo o esquema permitido para o protocolo que o site deseja manipular. Por exemplo,
você pode se registrar para lidar com links de mensagens de texto SMS passando o esquema "sms".

Por motivos de segurança, registerProtocolHandler() restringe quais esquemas podem ser registrados.

Nota:
  * A custom scheme may be registered as long as:
    * O nome dos esquemas personalizados começa com web+
    * O nome do esquema personalizado inclui pelo menos 1 letra após o prefixo web+
    * O esquema personalizado tem apenas letras ASCII minúsculas em seu nome.

func (*GlobalAttributes) SetSelected

func (e *GlobalAttributes) SetSelected(selected bool) (ref *GlobalAttributes)

SetSelected

English:

If present, this Boolean attribute indicates that the option is initially selected. If the
<option> element is the descendant of a <select> element whose multiple attribute is not set,
only one single <option> of this <select> element may have the selected attribute.

Português:

Se presente, este atributo booleano indica que a opção foi selecionada inicialmente. Se o elemento
<option> é descendente de um elemento <select> cujo atributo múltiplo não está definido, apenas um
único <option> deste elemento <select> pode ter o atributo selecionado.

func (*GlobalAttributes) SetSize

func (e *GlobalAttributes) SetSize(size int) (ref *GlobalAttributes)

SetSize

English:

If the control is presented as a scrolling list box (e.g. when multiple is specified), this
attribute represents the number of rows in the list that should be visible at one time.
Browsers are not required to present a select element as a scrolled list box. The default value
is 0.

 Note:
   * According to the HTML5 specification, the default value for size should be 1; however, in
     practice, this has been found to break some web sites, and no other browser currently does
     that, so Mozilla has opted to continue to return 0 for the time being with Firefox.

Português:

Se o controle for apresentado como uma caixa de listagem de rolagem (por exemplo, quando múltiplo
é especificado), esse atributo representa o número de linhas na lista que devem estar visíveis ao
mesmo tempo. Os navegadores não precisam apresentar um elemento de seleção como uma caixa de
listagem rolada. O valor padrão é 0.

 Nota:
   * De acordo com a especificação HTML5, o valor padrão para tamanho deve ser 1; no entanto, na
     prática, descobriu-se que isso quebra alguns sites, e nenhum outro navegador atualmente faz
     isso, então a Mozilla optou por continuar retornando 0 por enquanto com o Firefox.

func (*GlobalAttributes) SetSpellcheck

func (e *GlobalAttributes) SetSpellcheck(spell bool) (ref *GlobalAttributes)

SetSpellcheck

English:

Specifies whether the element is to have its spelling and grammar checked or not

 Note:
   * The following can be spellchecked:
       Text values in input elements (not password)
       Text in <textarea> elements
       Text in editable elements

Português:

Especifica se o elemento deve ter sua ortografia e gramática verificadas ou não

O seguinte pode ser verificado ortográfico:

Nota:
  * O seguinte pode ser verificado ortográfico:
      Valores de texto em elementos de entrada (não senha)
      Texto em elementos <textarea>
      Texto em elementos editáveis

func (*GlobalAttributes) SetSrc

func (e *GlobalAttributes) SetSrc(src string) (ref *GlobalAttributes)

SetSrc

English:

Valid for the image input button only, the src is string specifying the URL of the image file to
display to represent the graphical submit button.

Português:

Válido apenas para o botão de entrada de imagem, o src é uma string que especifica a URL do
arquivo de imagem a ser exibido para representar o botão de envio gráfico.

func (*GlobalAttributes) SetStep

func (e *GlobalAttributes) SetStep(step int) (ref *GlobalAttributes)

SetStep

English:

Valid for the numeric input types, including number, date/time input types, and range, the step
attribute is a number that specifies the granularity that the value must adhere to.

 If not explicitly included:
   * step defaults to 1 for number and range;
   * For the date/time input types, step is expressed in seconds, with the default step being 60
     seconds. The step scale factor is 1000 (which converts the seconds to milliseconds, as used
     in other algorithms);
   * The value must be a positive number—integer or float—or the special value any, which means
     no stepping is implied, and any value is allowed (barring other constraints, such as min and
     max).

If any is not explicitly set, valid values for the number, date/time input types, and range input types are equal to the basis for stepping — the min value and increments of the step value, up to the max value, if specified.

For example, if you have <input type="number" min="10" step="2">, then any even integer, 10 or greater, is valid. If omitted, <input type="number">, any integer is valid, but floats (like 4.2) are not valid, because step defaults to 1. For 4.2 to be valid, step would have had to be set to any, 0.1, 0.2, or any the min value would have had to be a number ending in .2, such as <input type="number" min="-5.2">

Note:
  * When the data entered by the user doesn't adhere to the stepping configuration, the value is
    considered invalid in constraint validation and will match the :invalid pseudoclass.

Português:

Válido para os tipos de entrada numérica, incluindo número, tipos de entrada de data e hora e
intervalo, o atributo step é um número que especifica a granularidade à qual o valor deve aderir.

 Se não estiver explicitamente incluído:
   * step padroniza para 1 para número e intervalo.
   * Para os tipos de entrada de data e hora, a etapa é expressa em segundos, com a etapa padrão
     sendo 60 segundos. O fator de escala de passo é 1000 (que converte os segundos em
     milissegundos, conforme usado em outros algoritmos).
   * O valor deve ser um número positivo — inteiro ou flutuante — ou o valor especial any, o que
     significa que nenhuma depuração está implícita e qualquer valor é permitido (exceto outras
     restrições, como min e max).

Se algum não for definido explicitamente, os valores válidos para o número, tipos de entrada de data e hora e tipos de entrada de intervalo são iguais à base para a depuração — o valor mínimo e os incrementos do valor da etapa, até o valor máximo, se especificado.

Por exemplo, se você tiver <input type="number" min="10" step="2">, qualquer número inteiro par, 10 ou maior, é válido. Se omitido, <input type="number">, qualquer inteiro é válido, mas floats (como 4.2) não são válidos, porque step é padronizado como 1. Para 4.2 ser válido, step teria que ser definido como any, 0.1 , 0.2 ou qualquer valor mínimo teria que ser um número que terminasse em .2, como <input type="number" min="-5.2">

Nota:
  * Quando os dados inseridos pelo usuário não estão de acordo com a configuração de stepping,
    o valor é considerado inválido na validação da restrição e corresponderá à
    :invalid pseudoclass.

func (*GlobalAttributes) SetStyle

func (e *GlobalAttributes) SetStyle(style string) (ref *GlobalAttributes)

SetStyle

English:

Specifies an inline CSS style for an element.

The style attribute will override any style set globally, e.g. styles specified in the <style> tag or in an external style sheet.

The style attribute can be used on any HTML element (it will validate on any HTML element. However, it is not necessarily useful).

Português:

Especifica um estilo CSS embutido para um elemento

O atributo style substituirá qualquer conjunto de estilos globalmente, por exemplo estilos especificados na tag <style> ou em uma folha de estilo externa.

O atributo style pode ser usado em qualquer elemento HTML (vai validar em qualquer elemento HTML. No entanto, não é necessariamente útil).

func (*GlobalAttributes) SetTabIndex

func (e *GlobalAttributes) SetTabIndex(index int) (ref *GlobalAttributes)

SetTabIndex

English:

Specifies the tabbing order of an element (when the "tab" button is used for navigating).

The tabindex attribute can be used on any HTML element (it will validate on any HTML element. However, it is not necessarily useful).

Português:

Especifica a ordem de tabulação de um elemento (quando o botão "tab" é usado para navegar).

O atributo tabindex pode ser usado em qualquer elemento HTML (vai validar em qualquer elemento HTML. No entanto, não é necessariamente útil).

func (*GlobalAttributes) SetTarget

func (e *GlobalAttributes) SetTarget(target Target) (ref *GlobalAttributes)

SetTarget

English:

Where to display the linked URL, as the name for a browsing context (a tab, window, or <iframe>). The following keywords have special meanings for where to load the URL:

KTargetSelf: the current browsing context; (Default)
KTargetBlank: usually a new tab, but users can configure browsers to open a new window instead;
KTargetParent: the parent browsing context of the current one. If no parent, behaves as _self;
KTargetTop: the topmost browsing context (the "highest" context that's an ancestor of the current
  one). If no ancestors, behaves as _self.

Note:
  * Setting KTargetBlank on <a> elements implicitly provides the same rel behavior as setting
    rel="noopener" which does not set window.opener. See browser compatibility for support
    status.

Português:

Onde exibir a URL vinculada, como o nome de um contexto de navegação (uma guia, janela ou <iframe>). As seguintes palavras-chave têm significados especiais para onde carregar o URL:

KTargetSelf: o contexto de navegação atual; (padrão)
KTargetBlank: geralmente uma nova guia, mas os usuários podem configurar os navegadores para
  abrir uma nova janela;
KTargetParent: o contexto de navegação pai do atual. Se nenhum pai, se comporta como _self;
KTargetTop: o contexto de navegação mais alto (o contexto "mais alto" que é um ancestral do
  atual). Se não houver ancestrais, se comporta como _self.

Nota:
  * Definir KTargetBlank em elementos <a> fornece implicitamente o mesmo comportamento rel
    que definir rel="noopener" que não define window.opener. Consulte a compatibilidade do
    navegador para obter o status do suporte.

func (*GlobalAttributes) SetTextContent

func (e *GlobalAttributes) SetTextContent(text string) (ref *GlobalAttributes)

SetTextContent

English:

The textContent property of the Node interface represents the text content of the node and its
descendants.

 Note:
   * SetTextContent() and SetInnerText() are easily confused, but the two properties are different
     in important ways.
   * Setting SetTextContent() on a node removes all of the node's children and replaces them with
     a single text node with the given string value.

Differences from SetInnerText()

Don't get confused by the differences between GetTextContent() / SetTextContent() and GetInnerText() / SetInnerText(). Although the names seem similar, there are important differences:

GetTextContent() / SetTextContent() gets the content of all elements, including <script> and <style> elements. In contrast, GetInnerText() / SetInnerText() only shows "human-readable" elements.

GetTextContent() returns every element in the node. In contrast, innerText is aware of styling and won't return the text of "hidden" elements.

Moreover, since GetInnerText() / SetInnerText() takes CSS styles into account, reading the value of innerText triggers a reflow to ensure up-to-date computed styles. (Reflows can be computationally expensive, and thus should be avoided when possible.)

Both SetTextContent() and SetInnerText() remove child nodes when altered, but altering innerText in Internet Explorer (version 11 and below) also permanently destroys all descendant text nodes. It is impossible to insert the nodes again into any other element or into the same element after doing so.

Differences from SetInnerHtml()

GetInnerHtml() returns HTML, as its name indicates. Sometimes people use GetInnerHtml() / SetInnerHtml() to retrieve or write text inside an element, but GetTextContent() / SetTextContent() has better performance because its value is not parsed as HTML.

Moreover, using GetTextContent() / SetTextContent() can prevent XSS attacks.

Português:

A propriedade textContent da interface Node representa o conteúdo de texto do nó e seus
descendentes.

 Nota:
   * SetTextContent() e SetInnerText() são facilmente confundidos, mas as duas propriedades são
     diferentes em aspectos importantes;
   * Definir SetTextContent() em um nó remove todos os filhos do nó e os substitui por um único nó
     de texto com o valor de string fornecido.

Diferenças de SetInnerText()

Não se confunda com as diferenças entre GetTextContent() / SetTextContent() e GetInnerText() / SetInnerText(). Embora os nomes pareçam semelhantes, existem diferenças importantes:

GetTextContent() / SetTextContent() obtém o conteúdo de todos os elementos, incluindo os elementos <script> e <style>. Em contraste, GetInnerText() SetInnerText() mostra apenas elementos "legíveis para humanos".

GetTextContent() retorna todos os elementos no nó. Em contraste, innerText está ciente do estilo e não retornará o texto de elementos "ocultos".

Além disso, como GetInnerText() / SetInnerText() leva em consideração os estilos CSS, a leitura do valor de innerText aciona um refluxo para garantir estilos computados atualizados. (Os refluxos podem ser computacionalmente caros e, portanto, devem ser evitados quando possível.)

Ambos SetTextContent() e SetInnerText() removem nós filho quando alterados, mas alterar innerText no Internet Explorer (versão 11 e inferior) também destrói permanentemente todos os nós de texto descendentes. É impossível inserir os nós novamente em qualquer outro elemento ou no mesmo elemento depois de fazê-lo.

Diferenças de SetInnerHtml()

GetInnerHtml() retorna HTML, como seu nome indica. Às vezes, as pessoas usam GetInnerHtml() / SetInnerHtml() para recuperar ou escrever texto dentro de um elemento, mas GetTextContent() / SetTextContent() tem melhor desempenho porque seu valor não é analisado como HTML.

Além disso, usar GetTextContent() / SetTextContent() pode prevenir ataques XSS.

func (*GlobalAttributes) SetTitle

func (e *GlobalAttributes) SetTitle(title string) (ref *GlobalAttributes)

SetTitle

English:

Specifies extra information about an element.

The information is most often shown as a tooltip text when the mouse moves over the element.

The title attribute can be used on any HTML element (it will validate on any HTML element. However, it is not necessarily useful).

Português:

Especifica informações extras sobre um elemento.

As informações geralmente são mostradas como um texto de dica de ferramenta quando o mouse se move sobre o elemento.

O atributo title pode ser usado em qualquer elemento HTML (vai validar em qualquer elemento HTML. No entanto, não é necessariamente útil).

func (*GlobalAttributes) SetTranslate

func (e *GlobalAttributes) SetTranslate(translate Translate) (ref *GlobalAttributes)

SetTranslate

English:

Specifies whether the content of an element should be translated or not.

 Input:
   translate: element should be translated or not. [ KTranslateYes | KTranslateNo ]

English:

Especifica se o conteúdo de um elemento deve ser traduzido ou não.

 Entrada:
   translate: elemento deve ser traduzido ou não. [ KTranslateYes | KTranslateNo ]

func (*GlobalAttributes) SetUrl

func (e *GlobalAttributes) SetUrl(url string) (ref *GlobalAttributes)

SetUrl

English:

A string containing the URL of the handler.

This URL must include %s, as a placeholder that will be replaced with the escaped URL to be handled.

Note:
  * The handler URL must use the https scheme. Older browsers also supported http.

Português:

Uma string contendo o URL do manipulador.

Este URL deve incluir %s, como um marcador de posição que será substituído pelo URL de escape a ser tratado.

Nota:
  * A URL do manipulador deve usar o esquema https. Os navegadores mais antigos também
    suportavam http.

func (*GlobalAttributes) SetValue

func (e *GlobalAttributes) SetValue(value string) (ref *GlobalAttributes)

SetValue

English:

Defines the value associated with the element.

Português:

Define o valor associado ao elemento.

func (*GlobalAttributes) SetWarp

func (e *GlobalAttributes) SetWarp(warp Warp) (ref *GlobalAttributes)

SetWarp

English:

Indicates how the control wraps text.

Português:

Indica como o controle quebra o texto.

func (*GlobalAttributes) SetX

func (e *GlobalAttributes) SetX(x int) (ref *GlobalAttributes)

SetX

English:

Sets the X axe in pixels.

Português:

Define o eixo X em pixels.

func (*GlobalAttributes) SetXY

func (e *GlobalAttributes) SetXY(x, y int) (ref *GlobalAttributes)

SetXY

English:

Sets the X and Y axes in pixels.

Português:

Define os eixos X e Y em pixels.

func (*GlobalAttributes) SetY

func (e *GlobalAttributes) SetY(y int) (ref *GlobalAttributes)

SetY

English:

Sets the Y axe in pixels.

Português:

Define o eixo Y em pixels.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL