Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MarkupDoctype = []byte(`<!DOCTYPE html>`) MarkupSpace = []byte(` `) MarkupQuote = []byte(`"`) MarkupEquals = []byte(`=`) MarkupCloseTag = []byte(`>`) MarkupSelfCloseTag = []byte(` />`) )
Utility constants for HTML rendering
View Source
var ( TagA = []byte(`<a`) TagAbbr = []byte(`<abbr`) TagAddress = []byte(`<address`) TagArea = []byte(`<area`) TagArticle = []byte(`<article`) TagAside = []byte(`<aside`) TagAudio = []byte(`<audio`) TagB = []byte(`<b`) TagBase = []byte(`<base`) TagBdi = []byte(`<bdi`) TagBdo = []byte(`<bdo`) TagBlockquote = []byte(`<blockquote`) TagBody = []byte(`<body`) TagBr = []byte(`<br`) TagButton = []byte(`<button`) TagCanvas = []byte(`<canvas`) TagCaption = []byte(`<caption`) TagCite = []byte(`<cite`) TagCode = []byte(`<code`) TagCol = []byte(`<col`) TagColgroup = []byte(`<colgroup`) TagData = []byte(`<data`) TagDatalist = []byte(`<datalist`) TagDd = []byte(`<dd`) TagDel = []byte(`<del`) TagDetails = []byte(`<details`) TagDfn = []byte(`<dfn`) TagDialog = []byte(`<dialog`) TagDiv = []byte(`<div`) TagDl = []byte(`<dl`) TagDt = []byte(`<dt`) TagEm = []byte(`<em`) TagEmbed = []byte(`<embed`) TagFieldset = []byte(`<fieldset`) TagFigcaption = []byte(`<figcaption`) TagFigure = []byte(`<figure`) TagForm = []byte(`<form`) TagH1 = []byte(`<h1`) TagH2 = []byte(`<h2`) TagH3 = []byte(`<h3`) TagH4 = []byte(`<h4`) TagH5 = []byte(`<h5`) TagH6 = []byte(`<h6`) TagHead = []byte(`<head`) TagHeader = []byte(`<header`) TagHgroup = []byte(`<hgroup`) TagHr = []byte(`<hr`) TagHtml = []byte(`<html`) TagI = []byte(`<i`) TagIframe = []byte(`<iframe`) TagImg = []byte(`<img`) TagInput = []byte(`<input`) TagIns = []byte(`<ins`) TagKbd = []byte(`<kbd`) TagLabel = []byte(`<label`) TagLegend = []byte(`<legend`) TagLi = []byte(`<li`) TagLink = []byte(`<link`) TagMain = []byte(`<main`) TagMap = []byte(`<map`) TagMark = []byte(`<mark`) TagMath = []byte(`<math`) TagMenu = []byte(`<menu`) TagMeta = []byte(`<meta`) TagMeter = []byte(`<meter`) TagNoscript = []byte(`<noscript`) TagObject = []byte(`<object`) TagOl = []byte(`<ol`) TagOptgroup = []byte(`<optgroup`) TagOption = []byte(`<option`) TagOutput = []byte(`<output`) TagP = []byte(`<p`) TagPicture = []byte(`<picture`) TagPre = []byte(`<pre`) TagProgress = []byte(`<progress`) TagQ = []byte(`<q`) TagRp = []byte(`<rp`) TagRt = []byte(`<rt`) TagRuby = []byte(`<ruby`) TagS = []byte(`<s`) TagSamp = []byte(`<samp`) TagScript = []byte(`<script`) TagSearch = []byte(`<search`) TagSection = []byte(`<section`) TagSelect = []byte(`<select`) TagSlot = []byte(`<slot`) TagSmall = []byte(`<small`) TagSource = []byte(`<source`) TagSpan = []byte(`<span`) TagStrong = []byte(`<strong`) TagStyle = []byte(`<style`) TagSub = []byte(`<sub`) TagSummary = []byte(`<summary`) TagSup = []byte(`<sup`) TagSvg = []byte(`<svg`) TagTable = []byte(`<table`) TagTbody = []byte(`<tbody`) TagTd = []byte(`<td`) TagTemplate = []byte(`<template`) TagTextarea = []byte(`<textarea`) TagTfoot = []byte(`<tfoot`) TagTh = []byte(`<th`) TagThead = []byte(`<thead`) TagTime = []byte(`<time`) TagTitle = []byte(`<title`) TagTr = []byte(`<tr`) TagTrack = []byte(`<track`) TagU = []byte(`<u`) TagUl = []byte(`<ul`) TagVar = []byte(`<var`) TagVideo = []byte(`<video`) TagWbr = []byte(`<wbr`) )
HTML tag opening constants
View Source
var ( TagAClose = []byte(`</a>`) TagAbbrClose = []byte(`</abbr>`) TagAddressClose = []byte(`</address>`) TagArticleClose = []byte(`</article>`) TagAsideClose = []byte(`</aside>`) TagAudioClose = []byte(`</audio>`) TagBClose = []byte(`</b>`) TagBdiClose = []byte(`</bdi>`) TagBdoClose = []byte(`</bdo>`) TagBlockquoteClose = []byte(`</blockquote>`) TagBodyClose = []byte(`</body>`) TagButtonClose = []byte(`</button>`) TagCanvasClose = []byte(`</canvas>`) TagCaptionClose = []byte(`</caption>`) TagCiteClose = []byte(`</cite>`) TagCodeClose = []byte(`</code>`) TagColgroupClose = []byte(`</colgroup>`) TagDataClose = []byte(`</data>`) TagDatalistClose = []byte(`</datalist>`) TagDdClose = []byte(`</dd>`) TagDelClose = []byte(`</del>`) TagDetailsClose = []byte(`</details>`) TagDfnClose = []byte(`</dfn>`) TagDialogClose = []byte(`</dialog>`) TagDivClose = []byte(`</div>`) TagDlClose = []byte(`</dl>`) TagDtClose = []byte(`</dt>`) TagEmClose = []byte(`</em>`) TagFieldsetClose = []byte(`</fieldset>`) TagFigcaptionClose = []byte(`</figcaption>`) TagFigureClose = []byte(`</figure>`) TagFormClose = []byte(`</form>`) TagH1Close = []byte(`</h1>`) TagH2Close = []byte(`</h2>`) TagH3Close = []byte(`</h3>`) TagH4Close = []byte(`</h4>`) TagH5Close = []byte(`</h5>`) TagH6Close = []byte(`</h6>`) TagHeadClose = []byte(`</head>`) TagHeaderClose = []byte(`</header>`) TagHgroupClose = []byte(`</hgroup>`) TagHtmlClose = []byte(`</html>`) TagIClose = []byte(`</i>`) TagIframeClose = []byte(`</iframe>`) TagInsClose = []byte(`</ins>`) TagKbdClose = []byte(`</kbd>`) TagLabelClose = []byte(`</label>`) TagLegendClose = []byte(`</legend>`) TagLiClose = []byte(`</li>`) TagMainClose = []byte(`</main>`) TagMapClose = []byte(`</map>`) TagMarkClose = []byte(`</mark>`) TagMathClose = []byte(`</math>`) TagMenuClose = []byte(`</menu>`) TagMeterClose = []byte(`</meter>`) TagNoscriptClose = []byte(`</noscript>`) TagObjectClose = []byte(`</object>`) TagOlClose = []byte(`</ol>`) TagOptgroupClose = []byte(`</optgroup>`) TagOptionClose = []byte(`</option>`) TagOutputClose = []byte(`</output>`) TagPClose = []byte(`</p>`) TagPictureClose = []byte(`</picture>`) TagPreClose = []byte(`</pre>`) TagProgressClose = []byte(`</progress>`) TagQClose = []byte(`</q>`) TagRpClose = []byte(`</rp>`) TagRtClose = []byte(`</rt>`) TagRubyClose = []byte(`</ruby>`) TagSClose = []byte(`</s>`) TagSampClose = []byte(`</samp>`) TagScriptClose = []byte(`</script>`) TagSearchClose = []byte(`</search>`) TagSectionClose = []byte(`</section>`) TagSelectClose = []byte(`</select>`) TagSlotClose = []byte(`</slot>`) TagSmallClose = []byte(`</small>`) TagSpanClose = []byte(`</span>`) TagStrongClose = []byte(`</strong>`) TagStyleClose = []byte(`</style>`) TagSubClose = []byte(`</sub>`) TagSummaryClose = []byte(`</summary>`) TagSupClose = []byte(`</sup>`) TagSvgClose = []byte(`</svg>`) TagTableClose = []byte(`</table>`) TagTbodyClose = []byte(`</tbody>`) TagTdClose = []byte(`</td>`) TagTemplateClose = []byte(`</template>`) TagTextareaClose = []byte(`</textarea>`) TagTfootClose = []byte(`</tfoot>`) TagThClose = []byte(`</th>`) TagTheadClose = []byte(`</thead>`) TagTimeClose = []byte(`</time>`) TagTitleClose = []byte(`</title>`) TagTrClose = []byte(`</tr>`) TagUClose = []byte(`</u>`) TagUlClose = []byte(`</ul>`) TagVarClose = []byte(`</var>`) TagVideoClose = []byte(`</video>`) )
HTML tag closing constants
View Source
var ( AttrClass = []byte(` class="`) AttrID = []byte(` id="`) AttrStyle = []byte(` style="`) AttrTitle = []byte(` title="`) AttrTabIndex = []byte(` tabindex="`) AttrRole = []byte(` role="`) AttrLang = []byte(` lang="`) AttrAccessKey = []byte(` accesskey="`) AttrAnchor = []byte(` anchor="`) AttrAriaLabel = []byte(` arialabel="`) AttrAutoCapitalize = []byte(` autocapitalize="`) AttrAutoCorrect = []byte(` autocorrect="`) AttrContentEditable = []byte(` contenteditable="`) AttrDir = []byte(` dir="`) AttrEnterKeyHint = []byte(` enterkeyhint="`) AttrExportParts = []byte(` exportparts="`) AttrInputMode = []byte(` inputmode="`) AttrIs = []byte(` is="`) AttrItemId = []byte(` itemid="`) AttrItemProp = []byte(` itemprop="`) AttrItemRef = []byte(` itemref="`) AttrItemType = []byte(` itemtype="`) AttrNonce = []byte(` nonce="`) AttrPart = []byte(` part="`) AttrPopover = []byte(` popover="`) AttrSlot = []byte(` slot="`) AttrSpellCheck = []byte(` spellcheck="`) AttrTranslate = []byte(` translate="`) AttrVirtualKeyboardPolicy = []byte(` virtualkeyboardpolicy="`) AttrWritingSuggestions = []byte(` writingsuggestions="`) AttrOnClick = []byte(` onclick="`) AttrOnChange = []byte(` onchange="`) AttrOnInput = []byte(` oninput="`) AttrOnFocus = []byte(` onfocus="`) AttrOnBlur = []byte(` onblur="`) AttrOnSubmit = []byte(` onsubmit="`) AttrOnLoad = []byte(` onload="`) AttrOnError = []byte(` onerror="`) AttrOnAbort = []byte(` onabort="`) AttrOnAutoComplete = []byte(` onautocomplete="`) AttrOnAutoCompleteError = []byte(` onautocompleteerror="`) AttrOnCancel = []byte(` oncancel="`) AttrOnCanPlay = []byte(` oncanplay="`) AttrOnCanPlayThrough = []byte(` oncanplaythrough="`) AttrOnClose = []byte(` onclose="`) AttrOnContextMenu = []byte(` oncontextmenu="`) AttrOnCueChange = []byte(` oncuechange="`) AttrOnDblClick = []byte(` ondblclick="`) AttrOnDrag = []byte(` ondrag="`) AttrOnDragEnd = []byte(` ondragend="`) AttrOnDragEnter = []byte(` ondragenter="`) AttrOnDragLeave = []byte(` ondragleave="`) AttrOnDragOver = []byte(` ondragover="`) AttrOnDragStart = []byte(` ondragstart="`) AttrOnDrop = []byte(` ondrop="`) AttrOnDurationChange = []byte(` ondurationchange="`) AttrOnEmptied = []byte(` onemptied="`) AttrOnEnded = []byte(` onended="`) AttrOnInvalid = []byte(` oninvalid="`) AttrOnKeyDown = []byte(` onkeydown="`) AttrOnKeyPress = []byte(` onkeypress="`) AttrOnKeyUp = []byte(` onkeyup="`) AttrOnLoadedData = []byte(` onloadeddata="`) AttrOnLoadedMetadata = []byte(` onloadedmetadata="`) AttrOnLoadStart = []byte(` onloadstart="`) AttrOnMouseDown = []byte(` onmousedown="`) AttrOnMouseEnter = []byte(` onmouseenter="`) AttrOnMouseLeave = []byte(` onmouseleave="`) AttrOnMouseMove = []byte(` onmousemove="`) AttrOnMouseOut = []byte(` onmouseout="`) AttrOnMouseOver = []byte(` onmouseover="`) AttrOnMouseUp = []byte(` onmouseup="`) AttrOnMouseWheel = []byte(` onmousewheel="`) AttrOnPause = []byte(` onpause="`) AttrOnPlay = []byte(` onplay="`) AttrOnPlaying = []byte(` onplaying="`) AttrOnProgress = []byte(` onprogress="`) AttrOnRateChange = []byte(` onratechange="`) AttrOnReset = []byte(` onreset="`) AttrOnResize = []byte(` onresize="`) AttrOnScroll = []byte(` onscroll="`) AttrOnSeeked = []byte(` onseeked="`) AttrOnSeeking = []byte(` onseeking="`) AttrOnSelect = []byte(` onselect="`) AttrOnShow = []byte(` onshow="`) AttrOnSort = []byte(` onsort="`) AttrOnStalled = []byte(` onstalled="`) AttrOnSuspend = []byte(` onsuspend="`) AttrOnTimeUpdate = []byte(` ontimeupdate="`) AttrOnToggle = []byte(` ontoggle="`) AttrOnVolumeChange = []byte(` onvolumechange="`) AttrOnWaiting = []byte(` onwaiting="`) AttrHref = []byte(` href="`) AttrAttributionSrc = []byte(` attributionsrc="`) AttrDownload = []byte(` download="`) AttrHrefLang = []byte(` hreflang="`) AttrPing = []byte(` ping="`) AttrReferrerPolicy = []byte(` referrerpolicy="`) AttrRel = []byte(` rel="`) AttrTarget = []byte(` target="`) AttrType = []byte(` type="`) AttrShape = []byte(` shape="`) AttrCoords = []byte(` coords="`) AttrAlt = []byte(` alt="`) AttrMedia = []byte(` media="`) AttrSrc = []byte(` src="`) AttrControlsList = []byte(` controlslist="`) AttrCrossOrigin = []byte(` crossorigin="`) AttrPreload = []byte(` preload="`) AttrCite = []byte(` cite="`) AttrCommand = []byte(` command="`) AttrCommandfor = []byte(` commandfor="`) AttrForm = []byte(` form="`) AttrFormaction = []byte(` formaction="`) AttrFormenctype = []byte(` formenctype="`) AttrFormmethod = []byte(` formmethod="`) AttrFormtarget = []byte(` formtarget="`) AttrName = []byte(` name="`) AttrPopOverTarget = []byte(` popovertarget="`) AttrPopovertargetaction = []byte(` popovertargetaction="`) AttrValue = []byte(` value="`) AttrHeight = []byte(` height="`) AttrWidth = []byte(` width="`) AttrSpan = []byte(` span="`) AttrDateTime = []byte(` datetime="`) AttrClosedBy = []byte(` closedby="`) AttrAction = []byte(` action="`) AttrMethod = []byte(` method="`) AttrAcceptCharset = []byte(` acceptcharset="`) AttrAutoComplete = []byte(` autocomplete="`) AttrEncType = []byte(` enctype="`) AttrProfile = []byte(` profile="`) AttrXmlns = []byte(` xmlns="`) AttrManifest = []byte(` manifest="`) AttrLoading = []byte(` loading="`) AttrAllow = []byte(` allow="`) AttrSandbox = []byte(` sandbox="`) AttrSrcDoc = []byte(` srcdoc="`) AttrSizes = []byte(` sizes="`) AttrSrcset = []byte(` srcset="`) AttrDecoding = []byte(` decoding="`) AttrFetchPriority = []byte(` fetchpriority="`) AttrUseMap = []byte(` usemap="`) AttrAccept = []byte(` accept="`) AttrCapture = []byte(` capture="`) AttrDirName = []byte(` dirname="`) AttrFormAction = []byte(` formaction="`) AttrFormEncType = []byte(` formenctype="`) AttrFormMethod = []byte(` formmethod="`) AttrFormTarget = []byte(` formtarget="`) AttrList = []byte(` list="`) AttrMax = []byte(` max="`) AttrMaxLength = []byte(` maxlength="`) AttrMin = []byte(` min="`) AttrMinLength = []byte(` minlength="`) AttrPattern = []byte(` pattern="`) AttrPlaceholder = []byte(` placeholder="`) AttrPopoverTarget = []byte(` popovertarget="`) AttrPopoverTargetAction = []byte(` popovertargetaction="`) AttrSize = []byte(` size="`) AttrStep = []byte(` step="`) AttrFor = []byte(` for="`) AttrAs = []byte(` as="`) AttrIntegrity = []byte(` integrity="`) AttrBlocking = []byte(` blocking="`) AttrImageSrcset = []byte(` imagesrcset="`) AttrImageSizes = []byte(` imagesizes="`) AttrColor = []byte(` color="`) AttrDisplay = []byte(` display="`) AttrMathVariant = []byte(` mathvariant="`) AttrContent = []byte(` content="`) AttrCharset = []byte(` charset="`) AttrHttpEquiv = []byte(` httpequiv="`) AttrScheme = []byte(` scheme="`) AttrProperty = []byte(` property="`) AttrLow = []byte(` low="`) AttrHigh = []byte(` high="`) AttrOptimum = []byte(` optimum="`) AttrData = []byte(` data="`) AttrStart = []byte(` start="`) AttrLabel = []byte(` label="`) AttrViewBox = []byte(` viewbox="`) AttrPreserveAspectRatio = []byte(` preserveaspectratio="`) AttrBorder = []byte(` border="`) AttrCellPadding = []byte(` cellpadding="`) AttrCellSpacing = []byte(` cellspacing="`) AttrFrame = []byte(` frame="`) AttrRules = []byte(` rules="`) AttrSummary = []byte(` summary="`) AttrColSpan = []byte(` colspan="`) AttrRowSpan = []byte(` rowspan="`) AttrHeaders = []byte(` headers="`) AttrScope = []byte(` scope="`) AttrRows = []byte(` rows="`) AttrCols = []byte(` cols="`) AttrWrap = []byte(` wrap="`) AttrAbbr = []byte(` abbr="`) AttrAlign = []byte(` align="`) AttrBgColor = []byte(` bgcolor="`) AttrChar = []byte(` char="`) AttrCharOff = []byte(` charoff="`) AttrVAlign = []byte(` valign="`) AttrKind = []byte(` kind="`) AttrSrclang = []byte(` srclang="`) AttrPoster = []byte(` poster="`) )
HTML attribute name constants
View Source
var ( AttrHidden = []byte(` hidden="hidden"`) AttrAutoFocus = []byte(` autofocus="autofocus"`) AttrDraggable = []byte(` draggable="draggable"`) AttrInert = []byte(` inert="inert"`) AttrItemScope = []byte(` itemscope="itemscope"`) AttrAutoplay = []byte(` autoplay="autoplay"`) AttrControls = []byte(` controls="controls"`) AttrLoop = []byte(` loop="loop"`) AttrMuted = []byte(` muted="muted"`) AttrDisableRemotePlayback = []byte(` disableremoteplayback="disableremoteplayback"`) AttrDisabled = []byte(` disabled="disabled"`) AttrFormnovalidate = []byte(` formnovalidate="formnovalidate"`) AttrOpen = []byte(` open="open"`) AttrNoValidate = []byte(` novalidate="novalidate"`) AttrAllowFullscreen = []byte(` allowfullscreen="allowfullscreen"`) AttrIsMap = []byte(` ismap="ismap"`) AttrChecked = []byte(` checked="checked"`) AttrFormNoValidate = []byte(` formnovalidate="formnovalidate"`) AttrMultiple = []byte(` multiple="multiple"`) AttrReadOnly = []byte(` readonly="readonly"`) AttrRequired = []byte(` required="required"`) AttrReversed = []byte(` reversed="reversed"`) AttrSelected = []byte(` selected="selected"`) AttrAsync = []byte(` async="async"`) AttrDefer = []byte(` defer="defer"`) AttrNoModule = []byte(` nomodule="nomodule"`) AttrDefault = []byte(` default="default"`) AttrDisablePictureInPicture = []byte(` disablepictureinpicture="disablepictureinpicture"`) AttrPlaysInline = []byte(` playsinline="playsinline"`) )
Boolean attribute constants
Functions ¶
This section is empty.
Types ¶
type EventAttributes ¶
type EventAttributes struct {
OnClick string
OnChange string
OnInput string
OnFocus string
OnBlur string
OnSubmit string
OnKeyDown string
OnKeyUp string
// contains filtered or unexported fields
}
EventAttributes represents event HTML attributes
func (*EventAttributes) AttributeBuilder ¶
func (ea *EventAttributes) AttributeBuilder(buf *bytes.Buffer)
AttributeBuilder writes all event attributes to the buffer
func (*EventAttributes) Attributes ¶
func (ea *EventAttributes) Attributes() *[]node.Attribute
Attributes returns the slice of attributes
func (*EventAttributes) SetAttribute ¶
func (ea *EventAttributes) SetAttribute(key string, value string)
SetAttribute sets an attribute in the event attributes slice
type GlobalAttributes ¶
type GlobalAttributes struct {
Style string
Title string
Role string
Lang string
AccessKey string
AriaLabel string
AutoCapitalize autocapitalize.AutoCapitalize
AutoCorrect autocorrect.AutoCorrect
ContentEditable contenteditable.ContentEditable
Dir dir.Dir
EnterKeyHint enterkeyhint.EnterKeyHint
ExportParts string
InputMode inputmode.InputMode
ItemProp string
ItemRef string
Part string
Popover popover.Popover
SpellCheck spellcheck.Spellcheck
Translate translate.Translate
VirtualKeyboardPolicy virtualkeyboardpolicy.VirtualKeyboardPolicy
WritingSuggestions writingsuggestions.WritingSuggestions
// contains filtered or unexported fields
}
GlobalAttributes represents global HTML attributes
func (*GlobalAttributes) AttributeBuilder ¶
func (ga *GlobalAttributes) AttributeBuilder(buf *bytes.Buffer)
AttributeBuilder writes all global attributes to the buffer
func (*GlobalAttributes) Attributes ¶
func (ga *GlobalAttributes) Attributes() *[]node.Attribute
Attributes returns the slice of attributes
func (*GlobalAttributes) SetAttribute ¶
func (ga *GlobalAttributes) SetAttribute(key string, value string)
SetAttribute sets an attribute in the global attributes slice
Click to show internal directories.
Click to hide internal directories.