package atom

Import Path
	golang.org/x/net/html/atom (on go.dev)

Dependency Relation
	imports 0 packages, and imported by 2 packages

Involved Source Files Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id". Sharing an atom's name between all elements with the same tag can result in fewer string allocations when tokenizing and parsing HTML. Integer comparisons are also generally faster than string comparisons. The value of an atom's particular code is not guaranteed to stay the same between versions of this package. Neither is any ordering guaranteed: whether atom.H1 < atom.H2 may also change. The codes are not guaranteed to be dense. The only guarantees are that e.g. looking up "div" will yield atom.Div, calling atom.Div.String will return "div", and atom.Div != 0. table.go
Package-Level Type Names (only one)
/* sort by: | */
Atom is an integer code for a string. The zero value maps to "". String returns the atom's name. Atom : expvar.Var Atom : fmt.Stringer func Lookup(s []byte) Atom const A const Abbr const Accept const AcceptCharset const Accesskey const Acronym const Action const Address const Align const Allowfullscreen const Allowpaymentrequest const Allowusermedia const Alt const Annotation const AnnotationXml const Applet const Area const Article const As const Aside const Async const Audio const Autocomplete const Autofocus const Autoplay const B const Base const Basefont const Bdi const Bdo const Bgsound const Big const Blink const Blockquote const Body const Br const Button const Canvas const Caption const Center const Challenge const Charset const Checked const Cite const Class const Code const Col const Colgroup const Color const Cols const Colspan const Command const Content const Contenteditable const Contextmenu const Controls const Coords const Crossorigin const Data const Datalist const Datetime const Dd const Default const Defer const Del const Desc const Details const Dfn const Dialog const Dir const Dirname const Disabled const Div const Dl const Download const Draggable const Dropzone const Dt const Em const Embed const Enctype const Face const Fieldset const Figcaption const Figure const Font const Footer const For const ForeignObject const Foreignobject const Form const Formaction const Formenctype const Formmethod const Formnovalidate const Formtarget const Frame const Frameset const H1 const H2 const H3 const H4 const H5 const H6 const Head const Header const Headers const Height const Hgroup const Hidden const High const Hr const Href const Hreflang const Html const HttpEquiv const I const Icon const Id const Iframe const Image const Img const Input const Inputmode const Ins const Integrity const Is const Isindex const Ismap const Itemid const Itemprop const Itemref const Itemscope const Itemtype const Kbd const Keygen const Keytype const Kind const Label const Lang const Legend const Li const Link const List const Listing const Loop const Low const Main const Malignmark const Manifest const Map const Mark const Marquee const Math const Max const Maxlength const Media const Mediagroup const Menu const Menuitem const Meta const Meter const Method const Mglyph const Mi const Min const Minlength const Mn const Mo const Ms const Mtext const Multiple const Muted const Name const Nav const Nobr const Noembed const Noframes const Nomodule const Nonce const Noscript const Novalidate const Object const Ol const Onabort const Onafterprint const Onautocomplete const Onautocompleteerror const Onauxclick const Onbeforeprint const Onbeforeunload const Onblur const Oncancel const Oncanplay const Oncanplaythrough const Onchange const Onclick const Onclose const Oncontextmenu const Oncopy const Oncuechange const Oncut const Ondblclick const Ondrag const Ondragend const Ondragenter const Ondragexit const Ondragleave const Ondragover const Ondragstart const Ondrop const Ondurationchange const Onemptied const Onended const Onerror const Onfocus const Onhashchange const Oninput const Oninvalid const Onkeydown const Onkeypress const Onkeyup const Onlanguagechange const Onload const Onloadeddata const Onloadedmetadata const Onloadend const Onloadstart const Onmessage const Onmessageerror const Onmousedown const Onmouseenter const Onmouseleave const Onmousemove const Onmouseout const Onmouseover const Onmouseup const Onmousewheel const Onoffline const Ononline const Onpagehide const Onpageshow const Onpaste const Onpause const Onplay const Onplaying const Onpopstate const Onprogress const Onratechange const Onrejectionhandled const Onreset const Onresize const Onscroll const Onsecuritypolicyviolation const Onseeked const Onseeking const Onselect const Onshow const Onsort const Onstalled const Onstorage const Onsubmit const Onsuspend const Ontimeupdate const Ontoggle const Onunhandledrejection const Onunload const Onvolumechange const Onwaiting const Onwheel const Open const Optgroup const Optimum const Option const Output const P const Param const Pattern const Picture const Ping const Placeholder const Plaintext const Playsinline const Poster const Pre const Preload const Progress const Prompt const Public const Q const Radiogroup const Rb const Readonly const Referrerpolicy const Rel const Required const Reversed const Rows const Rowspan const Rp const Rt const Rtc const Ruby const S const Samp const Sandbox const Scope const Scoped const Script const Seamless const Search const Section const Select const Selected const Shape const Size const Sizes const Slot const Small const Sortable const Sorted const Source const Spacer const Span const Spellcheck const Src const Srcdoc const Srclang const Srcset const Start const Step const Strike const Strong const Style const Sub const Summary const Sup const Svg const System const Tabindex const Table const Target const Tbody const Td const Template const Textarea const Tfoot const Th const Thead const Time const Title const Tr const Track const Translate const Tt const Type const Typemustmatch const U const Ul const Updateviacache const Usemap const Value const Var const Video const Wbr const Width const Workertype const Wrap const Xmp
Package-Level Functions (total 2)
Lookup returns the atom whose name is s. It returns zero if there is no such atom. The lookup is case sensitive.
String returns a string whose contents are equal to s. In that sense, it is equivalent to string(s) but may be more efficient.
Package-Level Constants (total 369)
const A Atom = 1
const Abbr Atom = 4
const Accept Atom = 6662
const AcceptCharset Atom = 6670
const Accesskey Atom = 11273
const Acronym Atom = 43527
const Action Atom = 156934
const Address Atom = 454919
const Align Atom = 45317
const Allowfullscreen Atom = 206863
const Allowpaymentrequest Atom = 49427
const Allowusermedia Atom = 56590
const Alt Atom = 62211
const Annotation Atom = 117002
const AnnotationXml Atom = 117006
const Applet Atom = 198662
const Area Atom = 217092
const Article Atom = 259591
const As Atom = 15362
const Aside Atom = 67333
const Async Atom = 65285
const Audio Atom = 70917
const Autocomplete Atom = 158476
const Autofocus Atom = 73993
const Autoplay Atom = 80904
const B Atom = 257
const Base Atom = 15108
const Basefont Atom = 15112
const Bdi Atom = 47619
const Bdo Atom = 84739
const Bgsound Atom = 89607
const Big Atom = 94211
const Blockquote Atom = 100106
const Body Atom = 10244
const Br Atom = 514
const Button Atom = 102662
const Canvas Atom = 66310
const Caption Atom = 140295
const Center Atom = 135942
const Challenge Atom = 167433
const Charset Atom = 8455
const Checked Atom = 374023
const Cite Atom = 105476
const Class Atom = 350213
const Code Atom = 388612
const Col Atom = 109315
const Colgroup Atom = 109320
const Color Atom = 114437
const Cols Atom = 115716
const Colspan Atom = 115719
const Command Atom = 120583
const Content Atom = 359175
const Contenteditable Atom = 359183
const Contextmenu Atom = 227851
const Controls Atom = 122376
const Coords Atom = 126982
const Crossorigin Atom = 129547
const Data Atom = 301316
const Datalist Atom = 301320
const Datetime Atom = 174856
const Dd Atom = 179970
const Default Atom = 68103
const Defer Atom = 389125
const Del Atom = 281603
const Desc Atom = 349444
const Details Atom = 29191
const Dfn Atom = 34563
const Dialog Atom = 47878
const Dir Atom = 37635
const Dirname Atom = 37639
const Disabled Atom = 91144
const Div Atom = 92931
const Dl Atom = 382466
const Download Atom = 285960
const Draggable Atom = 96777
const Dropzone Atom = 261896
const Dt Atom = 409602
const Em Atom = 28162
const Embed Atom = 28165
const Enctype Atom = 163847
const Face Atom = 135428
const Fieldset Atom = 137480
const Figcaption Atom = 139530
const Figure Atom = 146182
const Font Atom = 16132
const For Atom = 149251
const ForeignObject Atom = 149261
const Foreignobject Atom = 152589
const Form Atom = 155908
const Formaction Atom = 155914
const Formenctype Atom = 162827
const Formmethod Atom = 169738
const Formnovalidate Atom = 172302
const Formtarget Atom = 176906
const Frame Atom = 35589
const Frameset Atom = 35592
const H1 Atom = 89090
const H2 Atom = 352514
const H3 Atom = 183554
const H4 Atom = 195586
const H5 Atom = 212738
const H6 Atom = 215298
const Head Atom = 204804
const Header Atom = 204806
const Headers Atom = 204807
const Height Atom = 20998
const Hgroup Atom = 410118
const Hidden Atom = 179462
const High Atom = 182788
const Hr Atom = 87810
const Href Atom = 184068
const Hreflang Atom = 184072
const Html Atom = 22020
const HttpEquiv Atom = 186122
const I Atom = 1537
const Icon Atom = 358916
const Id Atom = 67842
const Iframe Atom = 191238
const Image Atom = 192773
const Img Atom = 194051
const Input Atom = 279813
const Inputmode Atom = 279817
const Ins Atom = 131843
const Integrity Atom = 143881
const Is Atom = 91394
const Isindex Atom = 196103
const Ismap Atom = 197893
const Itemid Atom = 230662
const Itemprop Atom = 105736
const Itemref Atom = 247559
const Itemscope Atom = 421641
const Itemtype Atom = 200200
const Kbd Atom = 47363
const Keygen Atom = 12806
const Keytype Atom = 54791
const Kind Atom = 96004
const Label Atom = 22789
const Lang Atom = 185092
const Legend Atom = 98566
const Li Atom = 45570
const List Atom = 302340
const Listing Atom = 302343
const Loop Atom = 23812
const Low Atom = 49923
const Main Atom = 4100
const Malignmark Atom = 45066
const Manifest Atom = 447752
const Map Atom = 198403
const Mark Atom = 46596
const Marquee Atom = 202247
const Math Atom = 204036
const Max Atom = 210691
const Maxlength Atom = 210697
const Media Atom = 58885
const Mediagroup Atom = 58890
const Menu Atom = 229636
const Menuitem Atom = 229640
const Meta Atom = 306180
const Meter Atom = 38917
const Method Atom = 170758
const Mglyph Atom = 194310
const Mi Atom = 213250
const Min Atom = 213251
const Minlength Atom = 213257
const Mn Atom = 173058
const Mo Atom = 41986
const Ms Atom = 422402
const Mtext Atom = 215813
const Multiple Atom = 219400
const Muted Atom = 221445
const Name Atom = 38404
const Nav Atom = 4867
const Nobr Atom = 14084
const Noembed Atom = 27655
const Noframes Atom = 35080
const Nomodule Atom = 41480
const Nonce Atom = 108037
const Noscript Atom = 180744
const Novalidate Atom = 173322
const Object Atom = 154374
const Ol Atom = 79618
const Onabort Atom = 103687
const Onafterprint Atom = 141580
const Onautocomplete Atom = 157966
const Onautocompleteerror Atom = 157971
const Onauxclick Atom = 398346
const Onbeforeprint Atom = 433165
const Onbeforeunload Atom = 451854
const Onblur Atom = 125446
const Oncancel Atom = 71944
const Oncanplay Atom = 85257
const Oncanplaythrough Atom = 85264
const Onchange Atom = 267528
const Onclick Atom = 189447
const Onclose Atom = 222727
const Oncontextmenu Atom = 227341
const Oncopy Atom = 232198
const Oncuechange Atom = 233739
const Oncut Atom = 236549
const Ondblclick Atom = 237834
const Ondrag Atom = 240390
const Ondragend Atom = 240393
const Ondragenter Atom = 242699
const Ondragexit Atom = 245514
const Ondragleave Atom = 252171
const Ondragover Atom = 254986
const Ondragstart Atom = 257547
const Ondrop Atom = 261382
const Ondurationchange Atom = 265488
const Onemptied Atom = 263177
const Onended Atom = 269575
const Onerror Atom = 271367
const Onfocus Atom = 273159
const Onhashchange Atom = 276236
const Oninput Atom = 279303
const Oninvalid Atom = 282377
const Onkeydown Atom = 284681
const Onkeypress Atom = 288010
const Onkeyup Atom = 291847
const Onlanguagechange Atom = 295184
const Onload Atom = 299270
const Onloadeddata Atom = 299276
const Onloadedmetadata Atom = 304144
const Onloadend Atom = 309769
const Onloadstart Atom = 312075
const Onmessage Atom = 314889
const Onmessageerror Atom = 314894
const Onmousedown Atom = 318475
const Onmouseenter Atom = 321292
const Onmouseleave Atom = 324364
const Onmousemove Atom = 327435
const Onmouseout Atom = 330250
const Onmouseover Atom = 333579
const Onmouseup Atom = 336393
const Onmousewheel Atom = 339980
const Onoffline Atom = 343049
const Ononline Atom = 345352
const Onpagehide Atom = 347402
const Onpageshow Atom = 353034
const Onpaste Atom = 356103
const Onpause Atom = 363015
const Onplay Atom = 365574
const Onplaying Atom = 365577
const Onpopstate Atom = 367882
const Onprogress Atom = 370442
const Onratechange Atom = 375820
const Onrejectionhandled Atom = 378898
const Onreset Atom = 383495
const Onresize Atom = 385288
const Onscroll Atom = 390408
const Onseeked Atom = 400904
const Onseeking Atom = 402953
const Onselect Atom = 405256
const Onshow Atom = 407814
const Onsort Atom = 412934
const Onstalled Atom = 415497
const Onstorage Atom = 417801
const Onsubmit Atom = 420104
const Onsuspend Atom = 424201
const Ontimeupdate Atom = 16396
const Ontoggle Atom = 426504
const Onunhandledrejection Atom = 428564
const Onunload Atom = 436488
const Onvolumechange Atom = 438542
const Onwaiting Atom = 442121
const Onwheel Atom = 444423
const Open Atom = 107268
const Optgroup Atom = 24328
const Optimum Atom = 446215
const Option Atom = 450822
const Output Atom = 332038
const P Atom = 3073
const Param Atom = 3077
const Pattern Atom = 26119
const Picture Atom = 31495
const Ping Atom = 61188
const Placeholder Atom = 78091
const Plaintext Atom = 111113
const Playsinline Atom = 81931
const Poster Atom = 411398
const Pre Atom = 289283
const Preload Atom = 293383
const Progress Atom = 370952
const Prompt Atom = 338438
const Public Atom = 357894
const Q Atom = 52993
const Radiogroup Atom = 778
const Rb Atom = 14850
const Readonly Atom = 217352
const Referrerpolicy Atom = 248590
const Rel Atom = 293635
const Required Atom = 147208
const Reversed Atom = 32776
const Rows Atom = 39940
const Rowspan Atom = 39943
const Rp Atom = 143106
const Rt Atom = 104962
const Rtc Atom = 104963
const Ruby Atom = 64260
const S Atom = 9473
const Samp Atom = 30724
const Sandbox Atom = 76039
const Scope Atom = 422661
const Scoped Atom = 422662
const Script Atom = 181254
const Seamless Atom = 224008
const Section Atom = 124167
const Select Atom = 405766
const Selected Atom = 405768
const Shape Atom = 128261
const Size Atom = 386308
const Sizes Atom = 386309
const Slot Atom = 132356
const Small Atom = 206341
const Sortable Atom = 413448
const Sorted Atom = 225798
const Source Atom = 274694
const Spacer Atom = 290310
const Span Atom = 40708
const Spellcheck Atom = 372746
const Src Atom = 387331
const Srcdoc Atom = 387334
const Srclang Atom = 456455
const Srcset Atom = 458246
const Start Atom = 259077
const Step Atom = 357124
const Strike Atom = 53766
const Strong Atom = 449286
const Style Atom = 459781
const Sub Atom = 420611
const Summary Atom = 461063
const Sup Atom = 462851
const Svg Atom = 463619
const System Atom = 464390
const Tabindex Atom = 307720
const Table Atom = 361733
const Target Atom = 177926
const Tbody Atom = 9989
const Td Atom = 37378
const Template Atom = 465160
const Textarea Atom = 216072
const Tfoot Atom = 62725
const Th Atom = 87554
const Thead Atom = 204549
const Time Atom = 16900
const Title Atom = 69637
const Tr Atom = 52226
const Track Atom = 113157
const Translate Atom = 133129
const Tt Atom = 26626
const Type Atom = 55556
const Typemustmatch Atom = 164621
const U Atom = 2817
const Ul Atom = 42754
const Updateviacache Atom = 17934
const Usemap Atom = 364038
const Value Atom = 5381
const Var Atom = 93443
const Video Atom = 188421
const Wbr Atom = 355331
const Width Atom = 409093
const Workertype Atom = 467210
const Wrap Atom = 469764
const Xmp Atom = 77571