Re: [RFC] [Vote] New ext-dom features in PHP 8.4
On 20/06/2024 16:28, Matthew Weier O'Phinney wrote:
>
>
> On Mon, Jun 10, 2024 at 1:15 PM Niels Dossche <[email protected] <mailto:[email protected]>> wrote:
>
> Hi internals
>
> I'm opening the vote of my RFC "New ext-dom features in PHP 8.4".
> RFC link: https://wiki.php.net/rfc/dom_additions_84
> <https://wiki.php.net/rfc/dom_additions_84>
> Voting runs until 24th of June 21:00 GMT+2.
>
> Kind regards
> Niels
>
>
> Question: why is Dom\Document::$head
marked as readonly?
The HTML spec defines the head property to be readonly: https://html.spec.whatwg.org/#document
That's why $head is marked readonly.
So I guess the question becomes "why does the HTML spec define it this way?"
I couldn't find a conclusive answer to this, it looks like this has been read-only since
HTML's early days...
I thought about it but don't really see a technical reason why this is the case. If I had to
take a guess I'd say it's for simplicity sake.
>
> --
> Matthew Weier O'Phinney
> [email protected] <mailto:[email protected]>
> https://mwop.net/ <https://mwop.net/>
> he/him
Kind regards
Niels
Thread (6 messages)