Added notes on attributes
This commit is contained in:
parent
a5306fcee4
commit
e2ca21a752
120
attribute types.txt
Normal file
120
attribute types.txt
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
(meter) min, max, low, high, optimum, value: R
|
||||||
|
(progress) max, value: R
|
||||||
|
DONE WITH FLOATS.
|
||||||
|
|
||||||
|
width, height: N
|
||||||
|
maxlength, minlength: N
|
||||||
|
rows: N⁺
|
||||||
|
rowspan: {x in N | x ≤ 65534}
|
||||||
|
cols: N⁺
|
||||||
|
colspan: {x in N⁺ | x ≤ 1000}
|
||||||
|
size: N⁺
|
||||||
|
tabindex: Z
|
||||||
|
DONE WITH INTEGERS.
|
||||||
|
|
||||||
|
step: R⁺ U {"any"}
|
||||||
|
- This will be a one-off. I can either feed it a *float32 and count the null as
|
||||||
|
many, or I can define a new `type StepValue *float32` with a couple of helper
|
||||||
|
functions `StepAny() StepValue {return nil}`
|
||||||
|
and `StepInt(value int) StepValue {return StepValue(&value)}`.
|
||||||
|
DONE WITH STEP.
|
||||||
|
|
||||||
|
EXPLICIT BOOLS:
|
||||||
|
contenteditable: explicit bool
|
||||||
|
draggable: explicit bool
|
||||||
|
spellcheck: explicit bool
|
||||||
|
DONE WITH EXPLICIT BOOLS.
|
||||||
|
|
||||||
|
accesskey: either a single printable character, or (poorly supported) a space-delimited list of characters
|
||||||
|
DONE WITH ACCESSKEY.
|
||||||
|
|
||||||
|
STRINGS:
|
||||||
|
action: URL (string)
|
||||||
|
alt: string
|
||||||
|
charset: IANA MIME encoding name (string)
|
||||||
|
cite: URI (string)
|
||||||
|
content: string
|
||||||
|
contextmenu: menu ID (string)
|
||||||
|
data: URL (string)
|
||||||
|
dirname: the the element's name ++ ".dir", or maybe any string; needs more research
|
||||||
|
download: destination filename (string)
|
||||||
|
form: ID of form (string)
|
||||||
|
formaction: URL (string)
|
||||||
|
href: URL (string)
|
||||||
|
hreflang: a string from the grammar specified in https://www.ietf.org/rfc/bcp/bcp47.txt
|
||||||
|
id: string
|
||||||
|
itemprop: string
|
||||||
|
label: string
|
||||||
|
lang: language tag specified in https://www.ietf.org/rfc/bcp/bcp47.txt (string)
|
||||||
|
list: ID of datalist (string)
|
||||||
|
media: CSS media query (string)
|
||||||
|
name: string
|
||||||
|
pattern: regex (string)
|
||||||
|
placeholder: string
|
||||||
|
poster: URL (string)
|
||||||
|
src: URL (string)
|
||||||
|
srcdoc: inline HTML (string)
|
||||||
|
srclang: language tag specified in https://www.ietf.org/rfc/bcp/bcp47.txt (string)
|
||||||
|
style: CSS (string)
|
||||||
|
title: string
|
||||||
|
usemap: URL fragment including "#" (string)
|
||||||
|
|
||||||
|
COMMA LISTS:
|
||||||
|
accept: comma-delimited list of MIME types, "audio/*", "video/*", "image/*", or file extension starting with "."
|
||||||
|
srcset: comma-delimited list of image descriptors; see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset
|
||||||
|
coords: comma-delimited list of floats; count depends on shape attribute value
|
||||||
|
rect → two x,y pairs: left, top, right, bottom
|
||||||
|
circle → x,y,r
|
||||||
|
poly → at least three x,y pairs
|
||||||
|
|
||||||
|
SPACE LISTS:
|
||||||
|
accept-charset: space- or comma-delimited list of character encodings
|
||||||
|
class: space-delimited list of string
|
||||||
|
for: space-delimited list of IDs
|
||||||
|
headers: space-delimited list of IDs
|
||||||
|
ping: space-delimited list of URLs
|
||||||
|
rel: space-delimited list of large enum
|
||||||
|
sandbox: space-delimited list of large enum
|
||||||
|
DONE WITH SPACE LISTS.
|
||||||
|
|
||||||
|
autocapitalize: enum {none, sentences, words, characters}
|
||||||
|
crossorigin: enum {anonymous, use-credentials}
|
||||||
|
decoding: enum {sync, async, auto}
|
||||||
|
dir: enum {ltr, rtl, auto}
|
||||||
|
enctype: enum {application/x-www-form-urlencoded, multipart/form-data, text/plain}
|
||||||
|
http-equiv: enum {content-security-policy, refresh}
|
||||||
|
kind: enum {subtitles, captions, descriptions, chapters, metadata}
|
||||||
|
method: enum {post, get, dialog}
|
||||||
|
preload: enum {none, metadata, auto}
|
||||||
|
referrerpolicy: enum {no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url}
|
||||||
|
scope: enum {row, col, rowgroup, colgroup, auto}
|
||||||
|
shape: enum {rect, circle, poly, default}
|
||||||
|
target: enum {_self, _blank, _parent, _top}; also iframe name for <form>
|
||||||
|
wrap: enum {hard, soft}
|
||||||
|
|
||||||
|
autocomplete:
|
||||||
|
form → enum {on, off}
|
||||||
|
input → enum (many options)
|
||||||
|
textarea → same as for input
|
||||||
|
datetime: an unholy union of fifty million date, time, and offset formats (string)
|
||||||
|
ins → date with optional time
|
||||||
|
del → date with optional time
|
||||||
|
datetime → an unholy union of fifty million date, time, and offset formats, representing a date or time in one place or everywhere (string)
|
||||||
|
sizes: three different definitions for <link>, <img>, and <source> >:(
|
||||||
|
type:
|
||||||
|
button → enum {submit, reset, button}
|
||||||
|
input → large enum
|
||||||
|
embed → MIME type (string)
|
||||||
|
object → content type (string)
|
||||||
|
script → "text/javascript", "module", or any other MIME type
|
||||||
|
source → MIME type with an optional codecs parameter as in https://tools.ietf.org/html/rfc4281
|
||||||
|
style → MIME type
|
||||||
|
value:
|
||||||
|
button → string
|
||||||
|
data → string
|
||||||
|
input → string
|
||||||
|
li → int
|
||||||
|
meter → float
|
||||||
|
option → string
|
||||||
|
progress → float
|
||||||
|
param → string
|
Loading…
Reference in New Issue
Block a user