/
typeTagInputWeek.go
1236 lines (1176 loc) · 44 KB
/
typeTagInputWeek.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package html
import (
"github.com/helmutkemper/iotmaker.santa_isabel_theater.platform.webbrowser/css"
"log"
"strconv"
"strings"
"syscall/js"
)
type TagInputWeek struct {
tag Tag
id string
selfElement js.Value
cssClass *css.Class
}
// AccessKey
//
// 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 (e *TagInputWeek) AccessKey(key string) (ref *TagInputWeek) {
e.selfElement.Set("accesskey", key)
return e
}
// Autofocus
//
// 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 (e *TagInputWeek) Autofocus(autofocus bool) (ref *TagInputWeek) {
e.selfElement.Set("autofocus", autofocus)
return e
}
// Class
//
// 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 (e *TagInputWeek) Class(class ...string) (ref *TagInputWeek) {
e.selfElement.Set("classList", strings.Join(class, " "))
return e
}
// ContentEditable
//
// 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 (e *TagInputWeek) ContentEditable(editable bool) (ref *TagInputWeek) {
e.selfElement.Set("contenteditable", editable)
return e
}
// Data
//
// 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 (e *TagInputWeek) Data(data map[string]string) (ref *TagInputWeek) {
for k, v := range data {
e.selfElement.Set(" data-"+k, v)
}
return e
}
// Dir
//
// 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 (e *TagInputWeek) Dir(dir Dir) (ref *TagInputWeek) {
e.selfElement.Set("dir", dir.String())
return e
}
// Draggable
//
// 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 (e *TagInputWeek) Draggable(draggable Draggable) (ref *TagInputWeek) {
e.selfElement.Set("draggable", draggable.String())
return e
}
// EnterKeyHint
//
// English:
//
// The enterKeyHint property is an enumerated property defining what action label (or icon) to
// present for the enter key on virtual keyboards. It reflects the enterkeyhint HTML global attribute
// and is an enumerated property, only accepting the following values as a DOMString:
//
// Input:
// enterKeyHint: defining what action label (or icon) to present for the enter key on virtual
// keyboards
// KEnterKeyHintEnter: typically indicating inserting a new line.
// KEnterKeyHintDone: typically meaning there is nothing more to input and the input method
// editor (IME) will be closed.
// KEnterKeyHintGo: typically meaning to take the user to the target of the text they typed.
// KEnterKeyHintNext: typically taking the user to the next field that will accept text.
// KEnterKeyHintPrevious: typically taking the user to the previous field that will accept text.
// KEnterKeyHintSearch: typically taking the user to the results of searching for the text they
// have typed.
// KEnterKeyHintSend: typically delivering the text to its target.
//
// If no enterKeyHint value has been specified or if it was set to a different value than the allowed
// ones, it will return an empty string.
//
// Português:
//
// A propriedade enterKeyHint é uma propriedade enumerada que define qual rótulo de ação (ou ícone)
// apresentar para a tecla Enter em teclados virtuais. Ele reflete o atributo global enterkeyhint
// HTML e é uma propriedade enumerada, aceitando apenas os seguintes valores como DOMString:
//
// Entrada:
// enterKeyHint: definindo qual rótulo de ação (ou ícone) apresentar para a tecla Enter em
// teclados virtuais
// KEnterKeyHintEnter: normalmente indicando a inserção de uma nova linha.
// KEnterKeyHintDone: normalmente significa que não há mais nada para inserir e o editor de
// método de entrada (IME) será fechado.
// KEnterKeyHintGo: normalmente significando levar o usuário ao destino do texto digitado.
// KEnterKeyHintNext: normalmente levando o usuário para o próximo campo que aceitará texto.
// KEnterKeyHintPrevious: normalmente levando o usuário ao campo anterior que aceitará texto.
// KEnterKeyHintSearch: normalmente levando o usuário aos resultados da pesquisa do texto que
// digitou.
// KEnterKeyHintSend: normalmente entregando o texto ao seu destino.
//
// Se nenhum valor enterKeyHint foi especificado ou se foi definido com um valor diferente dos
// permitidos, ele retornará uma string vazia.
func (e *TagInputWeek) EnterKeyHint(enterKeyHint EnterKeyHint) (ref *TagInputWeek) {
e.selfElement.Set("enterKeyHint", enterKeyHint.String())
return e
}
// Hidden
//
// 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 (e *TagInputWeek) Hidden() (ref *TagInputWeek) {
e.selfElement.Get("style").Set("visibility", "hidden")
return e
}
// Id
//
// 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 (e *TagInputWeek) Id(id string) (ref *TagInputWeek) {
e.id = id
e.selfElement.Set("id", id)
return e
}
// InputMode
//
// English:
//
// The inputmode global attribute is an enumerated attribute that hints at the type of data that
// might be entered by the user while editing the element or its contents. This allows a browser to
// display an appropriate virtual keyboard.
//
// It is used primarily on <input> elements, but is usable on any element in contenteditable mode.
//
// It's important to understand that the inputmode attribute doesn't cause any validity requirements
// to be enforced on input. To require that input conforms to a particular data type, choose an
// appropriate <input> element type. For specific guidance on choosing <input> types, see the Values
// section.
//
// Português:
//
// O atributo global inputmode é um atributo enumerado que indica o tipo de dados que pode ser
// inserido pelo usuário ao editar o elemento ou seu conteúdo. Isso permite que um navegador exiba
// um teclado virtual apropriado.
//
// Ele é usado principalmente em elementos <input>, mas pode ser usado em qualquer elemento no modo
// contenteditable.
//
// É importante entender que o atributo inputmode não faz com que nenhum requisito de validade seja
// imposto na entrada. Para exigir que a entrada esteja em conformidade com um tipo de dados
// específico, escolha um tipo de elemento <input> apropriado. Para obter orientações específicas
// sobre como escolher os tipos de <input>, consulte a seção Valores.
func (e *TagInputWeek) InputMode(inputMode InputMode) (ref *TagInputWeek) {
e.selfElement.Set("inputmode", inputMode.String())
return e
}
// Is
//
// English:
//
// Allows you to specify that a standard HTML element should behave like a registered custom
// built-in element.
//
// Português:
//
// Permite especificar que um elemento HTML padrão deve se comportar como um elemento interno
// personalizado registrado.
func (e *TagInputWeek) Is(is string) (ref *TagInputWeek) {
e.selfElement.Set("is", is)
return e
}
// ItemId
//
// English:
//
// The unique, global identifier of an item.
//
// Português:
//
// O identificador global exclusivo de um item.
func (e *TagInputWeek) ItemId(id string) (ref *TagInputWeek) {
e.selfElement.Set("itemid", id)
return e
}
// ItemDrop
//
// English:
//
// Used to add properties to an item. Every HTML element may have an itemprop attribute specified,
// where an itemprop consists of a name and value pair.
//
// Português:
//
// Usado para adicionar propriedades a um item. Cada elemento HTML pode ter um atributo itemprop
// especificado, onde um itemprop consiste em um par de nome e valor.
func (e *TagInputWeek) ItemDrop(itemprop string) (ref *TagInputWeek) {
e.selfElement.Set("itemprop", itemprop)
return e
}
// ItemRef
//
// English:
//
// Properties that are not descendants of an element with the itemscope attribute can be associated
// with the item using an itemref. It provides a list of element ids (not itemids) with additional
// properties elsewhere in the document.
//
// Português:
//
// Propriedades que não são descendentes de um elemento com o atributo itemscope podem ser
// associadas ao item usando um itemref. Ele fornece uma lista de IDs de elementos (não IDs de itens)
// com propriedades adicionais em outras partes do documento.
func (e *TagInputWeek) ItemRef(itemref string) (ref *TagInputWeek) {
e.selfElement.Set("itemref", itemref)
return e
}
// ItemType
//
// English:
//
// Specifies the URL of the vocabulary that will be used to define itemprops (item properties) in
// the data structure. itemscope is used to set the scope of where in the data structure the
// vocabulary set by itemtype will be active.
//
// Português:
//
// Especifica a URL do vocabulário que será usado para definir itemprops (propriedades do item) na
// estrutura de dados. itemscope é usado para definir o escopo de onde na estrutura de dados o
// vocabulário definido por tipo de item estará ativo.
func (e *TagInputWeek) ItemType(itemType string) (ref *TagInputWeek) {
e.selfElement.Set("itemtype", itemType)
return e
}
// Lang
//
// 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 (e *TagInputWeek) Lang(language Language) (ref *TagInputWeek) {
e.selfElement.Set("lang", language.String())
return e
}
// Nonce
//
// English:
//
// A space-separated list of the part names of the element. Part names allows CSS to select and style
// specific elements in a shadow tree via the ::part pseudo-element.
//
// Português:
//
// Uma lista separada por espaços dos nomes das partes do elemento. Os nomes das partes permitem que
// o CSS selecione e estilize elementos específicos em uma árvore de sombra por meio do
// pseudo-elemento ::part.
func (e *TagInputWeek) Nonce(part ...string) (ref *TagInputWeek) {
e.selfElement.Set("part", strings.Join(part, " "))
return e
}
// Slot
//
// English:
//
// Assigns a slot in a shadow DOM shadow tree to an element: An element with a slot attribute is
// assigned to the slot created by the <slot> element whose name attribute's value matches that slot
// attribute's value.
//
// Português:
//
// Atribui um slot em uma shadow DOM shadow tree a um elemento: Um elemento com um atributo slot é
// atribuído ao slot criado pelo elemento <slot> cujo valor do atributo name corresponde ao valor
// desse atributo slot.
func (e *TagInputWeek) Slot(slot string) (ref *TagInputWeek) {
e.selfElement.Set("slot", slot)
return e
}
// Spellcheck
//
// 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 (e *TagInputWeek) Spellcheck(spell bool) (ref *TagInputWeek) {
e.selfElement.Set("spellcheck", spell)
return e
}
// Style
//
// 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 (e *TagInputWeek) Style(style string) (ref *TagInputWeek) {
e.selfElement.Set("style", style)
return e
}
// TabIndex
//
// 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 (e *TagInputWeek) TabIndex(index int) (ref *TagInputWeek) {
e.selfElement.Set("tabindex", index)
return e
}
// Title
//
// 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 (e *TagInputWeek) Title(title string) (ref *TagInputWeek) {
e.selfElement.Set("title", title)
return e
}
// Translate
//
// 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 (e *TagInputWeek) Translate(translate Translate) (ref *TagInputWeek) {
e.selfElement.Set("translate", translate.String())
return e
}
// 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 (e *TagInputWeek) CreateElement(tag Tag) (ref *TagInputWeek) {
e.selfElement = js.Global().Get("document").Call("createElement", tag.String())
if e.selfElement.IsUndefined() == true || e.selfElement.IsNull() == true {
log.Print(KNewElementIsUndefined)
return
}
e.tag = tag
return e
}
// 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 (e *TagInputWeek) AppendById(appendId string) (ref *TagInputWeek) {
toAppend := js.Global().Get("document").Call("getElementById", appendId)
if toAppend.IsUndefined() == true || toAppend.IsNull() == true {
log.Print(KIdToAppendNotFound, appendId)
return e
}
toAppend.Call("appendChild", e.selfElement)
return e
}
// 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 (e *TagInputWeek) Append(append interface{}) (ref *TagInputWeek) {
switch append.(type) {
case *TagInputWeek:
e.selfElement.Call("appendChild", append.(*TagInputWeek).selfElement)
case js.Value:
e.selfElement.Call("appendChild", append)
case string:
toAppend := js.Global().Get("document").Call("getElementById", append.(string))
if toAppend.IsUndefined() == true || toAppend.IsNull() == true {
log.Print(KIdToAppendNotFound, append.(string))
return e
}
toAppend.Call("appendChild", e.selfElement)
}
return e
}
// Autocomplete
//
// 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 (e *TagInputWeek) Autocomplete(autocomplete Autocomplete) (ref *TagInputWeek) {
e.selfElement.Set("autocomplete", autocomplete.String())
return e
}
// Disabled
//
// 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 (e *TagInputWeek) Disabled(disabled bool) (ref *TagInputWeek) {
e.selfElement.Set("disabled", disabled)
return e
}
// Form
//
// 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 (e *TagInputWeek) Form(form string) (ref *TagInputWeek) {
e.selfElement.Set("form", form)
return e
}
// List
//
// 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 (e *TagInputWeek) List(list string) (ref *TagInputWeek) {
e.selfElement.Set("list", list)
return e
}
// Max
//
// 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 (e *TagInputWeek) Max(max int) (ref *TagInputWeek) {
e.selfElement.Set("max", max)
return e
}
// Min
//
// 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 (e *TagInputWeek) Min(min int) (ref *TagInputWeek) {
e.selfElement.Set("max", min)
return e
}
// Name
//
// 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.