Giter VIP home page Giter VIP logo

Comments (1)

lydell avatar lydell commented on May 27, 2024 1

Note: This only happens in JavaScript’s strict mode. Elm outputs 'use strict'; near the top. Took me a while to figure out – hope this saves someone time in the future.

Edit: I also tried to find all readonly properties.

I went to https://html.spec.whatwg.org/ (warning: massive page) and ran this JavaScript in the console:

Array.from(document.querySelectorAll("pre > code.idl"), e => { const text = e.textContent; const match = /interface (HTML\w*Element) /.exec(text); if (match === null) return undefined; const r = Array.from(text.matchAll(/(readonly .+) (\w+);/g)); return r.length === 0 ? undefined : [match[1], r] }).filter(Boolean).sort((a, b) => a[0].localeCompare(b[0])).map(([name, attrs]) => `${name}\n${attrs.map(a => `${a[2]} (${a[1]})`).join("\n")}`).join("\n\n")

This is the result:

HTMLAnchorElement
relList (readonly attribute DOMTokenList)

HTMLAreaElement
relList (readonly attribute DOMTokenList)

HTMLButtonElement
form (readonly attribute HTMLFormElement?)
willValidate (readonly attribute boolean)
validity (readonly attribute ValidityState)
validationMessage (readonly attribute DOMString)
labels (readonly attribute NodeList)

HTMLDataListElement
options (readonly attribute HTMLCollection)

HTMLElement
accessKeyLabel (readonly attribute DOMString)

HTMLFieldSetElement
form (readonly attribute HTMLFormElement?)
type (readonly attribute DOMString)
elements (readonly attribute HTMLCollection)
willValidate (readonly attribute boolean)
validity (readonly attribute ValidityState)
validationMessage (readonly attribute DOMString)

HTMLFormElement
relList (readonly attribute DOMTokenList)
elements (readonly attribute HTMLFormControlsCollection)
length (readonly attribute unsigned long)

HTMLFrameElement
contentDocument (readonly attribute Document?)
contentWindow (readonly attribute WindowProxy?)

HTMLIFrameElement
sandbox (readonly attribute DOMTokenList)
contentDocument (readonly attribute Document?)
contentWindow (readonly attribute WindowProxy?)

HTMLImageElement
naturalWidth (readonly attribute unsigned long)
naturalHeight (readonly attribute unsigned long)
complete (readonly attribute boolean)
currentSrc (readonly attribute USVString)

HTMLInputElement
form (readonly attribute HTMLFormElement?)
list (readonly attribute HTMLElement?)
willValidate (readonly attribute boolean)
validity (readonly attribute ValidityState)
validationMessage (readonly attribute DOMString)
labels (readonly attribute NodeList?)

HTMLLabelElement
form (readonly attribute HTMLFormElement?)
control (readonly attribute HTMLElement?)

HTMLLegendElement
form (readonly attribute HTMLFormElement?)

HTMLLinkElement
relList (readonly attribute DOMTokenList)
sizes (readonly attribute DOMTokenList)

HTMLMapElement
areas (readonly attribute HTMLCollection)

HTMLMediaElement
error (readonly attribute MediaError?)
currentSrc (readonly attribute USVString)
networkState (readonly attribute unsigned short)
buffered (readonly attribute TimeRanges)
readyState (readonly attribute unsigned short)
seeking (readonly attribute boolean)
duration (readonly attribute unrestricted double)
paused (readonly attribute boolean)
played (readonly attribute TimeRanges)
seekable (readonly attribute TimeRanges)
ended (readonly attribute boolean)
audioTracks (readonly attribute AudioTrackList)
videoTracks (readonly attribute VideoTrackList)
textTracks (readonly attribute TextTrackList)

HTMLMeterElement
labels (readonly attribute NodeList)

HTMLObjectElement
form (readonly attribute HTMLFormElement?)
contentDocument (readonly attribute Document?)
contentWindow (readonly attribute WindowProxy?)
willValidate (readonly attribute boolean)
validity (readonly attribute ValidityState)
validationMessage (readonly attribute DOMString)

HTMLOptionElement
form (readonly attribute HTMLFormElement?)
index (readonly attribute long)

HTMLOutputElement
htmlFor (readonly attribute DOMTokenList)
form (readonly attribute HTMLFormElement?)
type (readonly attribute DOMString)
willValidate (readonly attribute boolean)
validity (readonly attribute ValidityState)
validationMessage (readonly attribute DOMString)
labels (readonly attribute NodeList)

HTMLProgressElement
position (readonly attribute double)
labels (readonly attribute NodeList)

HTMLSelectElement
form (readonly attribute HTMLFormElement?)
type (readonly attribute DOMString)
options (readonly attribute HTMLOptionsCollection)
selectedOptions (readonly attribute HTMLCollection)
willValidate (readonly attribute boolean)
validity (readonly attribute ValidityState)
validationMessage (readonly attribute DOMString)
labels (readonly attribute NodeList)

HTMLTableCellElement
cellIndex (readonly attribute long)

HTMLTableElement
tBodies (readonly attribute HTMLCollection)
rows (readonly attribute HTMLCollection)

HTMLTableRowElement
rowIndex (readonly attribute long)
sectionRowIndex (readonly attribute long)
cells (readonly attribute HTMLCollection)

HTMLTableSectionElement
rows (readonly attribute HTMLCollection)

HTMLTemplateElement
content (readonly attribute DocumentFragment)

HTMLTextAreaElement
form (readonly attribute HTMLFormElement?)
type (readonly attribute DOMString)
textLength (readonly attribute unsigned long)
willValidate (readonly attribute boolean)
validity (readonly attribute ValidityState)
validationMessage (readonly attribute DOMString)
labels (readonly attribute NodeList)

HTMLTrackElement
readyState (readonly attribute unsigned short)
track (readonly attribute TextTrack)

HTMLVideoElement
videoWidth (readonly attribute unsigned long)
videoHeight (readonly attribute unsigned long)

from virtual-dom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.