02:29
<Krinkle>
TIL about rel="feed" (from above)
02:29
<Krinkle>
I wonder if that ever got meaningful adoption or if it was too little too late
02:29
<Krinkle>
might be a good excuse for me to finally figure out how to use http archive
02:30
<Krinkle>
though not sure dom attributes and/or <head> or <link> specifically is indexed by it
02:34
<Krinkle>
seems not, based on the mysql schema file
10:49
<croraf>
Let's say I have a select element with options
10:49
<croraf>
And there is an option with <option value>Text</option>
10:49
<croraf>
What would that mean, is this an error, or what is the value?
10:50
<annevk>
croraf: pretty sure the HTML Standard covers that in detail, but I forgot what it says exactly
11:45
<croraf>
annevk, https://html.spec.whatwg.org/#attr-option-value I check this. What does that mean
11:45
<croraf>
Oh I see now.
11:46
<croraf>
"The value attribute provides a value for element. The value of an option element is the value of the value content attribute, if there is one, or, if there is not, the value of the element's text IDL attribute."
11:46
<croraf>
So if I set the value attribute it is used as the value. If I don't the text (the content) is used instead.
11:50
<croraf>
Now, in the case I asked for, the value attribute is present but without being assigned to anything.
12:12
<ondras>
it is an empty string
12:49
<croraf>
ondras, thanks, have you tried it, or how do you know?
12:49
<croraf>
are any attributes defined without the value set to empty string?
12:53
<croraf>
I tried, and it indeed seems to be an empty string. I guess for any attribute without the value being set it is implicitly set to ""
12:55
<ondras>
the spec tells that as well
12:57
<ondras>
https://html.spec.whatwg.org/#attributes-2
12:58
<ondras>
The value is implicitly the empty string.
13:01
<croraf>
ondras, cool, ty very much
19:56
<Krinkle>
Do we know of any context in which scripts can execute in an HTML context in a modern brower (specifically Safari 14), but document.head is undefined by means other than e.g. something explicitly corrupting the document variable?
19:57
<Krinkle>
I thought head and body exist implicitly always as of HTML5 and thus these can't be undefined, or at least head can't be undefined from a script executing async, linked from inside <head>
20:07
<zcorpan>
Krinkle: it wouldn't be undefined but null, if a script removes the <head>, or if you're in an XML doc without a head
20:07
<zcorpan>
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/8649
20:24
<Domenic>
The only ways I can think of to get undefined are: (1) `document` is not actually a `Document` somehow, which probably falls into your excluded category; (2) situations involving detached browsing contexts where browsers often seem to violate the spec (e.g. `const d = iframe.contentDocument; iframe.remove(); d.head` might give undefined sometimes, especially in Safari.