Skip to content
Discussion options

You must be logged in to vote

By "appears in the HTML" do you mean "appears in HTML rendered by the server" or "appears in the browser's devtools representation of the DOM, which they format like HTML"? These are not the same thing. I meant that prop: does not appear in HTML rendered by the server, because it only exists in the browser. I don't know when/why different browser devtools choose to represent DOM properties as HTML attributes in their DOM inspectors. The relationship between HTML attributes and DOM properties is somewhat complicated for historical reasons. Here's a good overview.

disabled= will always set an attribute named disabled on an HTML element
prop:disabled= will always set a DOM property named dis…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@MaxBeaud
Comment options

@gbj
Comment options

gbj Nov 9, 2023
Maintainer

@MaxBeaud
Comment options

@gbj
Comment options

gbj Nov 10, 2023
Maintainer

Answer selected by MaxBeaud
@MaxBeaud
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants