Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123715 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 9CC9D1A009C for ; Thu, 20 Jun 2024 21:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718920634; bh=5HK+kIrg0q8UN70dWR4o+eVTTogGVZxW8Sgvd3ZGG20=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OHebLGL2vF++su7xSowzJpj3TWKUBQ4FVWU+ISGPdISO33vLLIK3b/WaL95ApuYPw k5bVminVZJ2aua/HuF7Ybl+ozMBQBdgn3Zh4wRjuPKq55LyaEbx8PTF0Bjt7/uilmK 17UwHd1YoMciCCfHjaoSCuBizZWkQGc7Y3nYsNKeXhPZcy8IpK3GX8ngVUBNVuhN6u 0+d39VcdH9+8YnrOr8giocNqy9AjxqCxtUzevledV9fM/4/ruFhF0vbfHUoaUFMzeg YwQIDMe4vpHrJlcU8PeXmfw8iWCZG/5MCuL7SIBicjhd7CPEvYuYTh++hZvnkmcxMQ GUEJgLThiNhVg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 943C91806DE for ; Thu, 20 Jun 2024 21:57:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-vk1-f177.google.com (mail-vk1-f177.google.com [209.85.221.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 20 Jun 2024 21:57:13 +0000 (UTC) Received: by mail-vk1-f177.google.com with SMTP id 71dfb90a1353d-4ef33a09a3aso408356e0c.2 for ; Thu, 20 Jun 2024 14:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718920558; x=1719525358; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YUtAKpck0OVlmz5EmAt5JoP5kWQfyEogqXJ5aqE7bEc=; b=HDA37XMx0p9ebxO/8bZj8FHaLNmdsUzLmPFVQuoiqdBOLasbq10ZlMR33G1L5U8yGY QpopYscw4wCGwNTBGKXXICBKYMThqyqjNDHat128DnjIl7TC5hCK4T8v0GLCuzssVniM Glnok2bM4uEWT+IqOtpM+kKzWiaEVvnAmdo6REHcmJPNKgO+wgqhSWZMkzGswmcVIyko H7fV612hJWr/ShaQNFD7VWll1fQR0pQZ4pNglBeN3/2/24vRqU8GeUTNWs07HWGr8XCO wL3Oaht6lsjN15mxoD0NeiaUX8LheLr24ArcSKLmX7NFS8BeAh2TrcXKwM/tcwagMRb/ pNlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718920558; x=1719525358; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YUtAKpck0OVlmz5EmAt5JoP5kWQfyEogqXJ5aqE7bEc=; b=euFxL0lEMiT0eKorq359UpYvw/BnUHpTtawLHD5+imxo8FeAxUB4WKMkmPdA3e2M4S xiI3mRCaeyKNHn4qqoY7yMhhH4aLif58PpSwJNwHd82sjMAFmjLZMBpLOiM6GBkOPpZX DgJ+bFLzB95PoL4o62/SI9SXkc6gftvyvzEKQSnJ7vrzqNdJ2zo7dCJDDr9LPP0Mq+oZ lKpBfgH+AfAsKSqS1HTu0CJiBzQf8ksjQoBrhyVVk0uGjCWevcfU2KNbuly76mcvMZiM bB46BOS5fYqYOgbIFDsaGOS1XW9BL1z3q2Ar8Mn3lVQ62fGuQSfagIprfZ2Ga0Dihjnn qxtQ== X-Gm-Message-State: AOJu0YyOLpUXsfglfQi91N2vSrk/XIAUG0w09VJY5vNGTnkp9kq6eoSc Iyxx3HV2ZdifhNVOJQqJe4gG58zEoMdtXTR4eyM/XQ0dXzKVjn0EO+PAHOkiXAz3n2x6NHHJ5HR 8ktmLNa9TV8WrmWGmHeAVsMiVEVw4Wg== X-Google-Smtp-Source: AGHT+IFc9T88fhmqBNl5Abfxe/tSll5yW8WlozLFF4e3ACskUP+fKEYRKMKIRdju9BPN9zDMz4B9Z82d/BsuXAfTRE4= X-Received: by 2002:a05:6122:3c8a:b0:4ed:f1:e0b7 with SMTP id 71dfb90a1353d-4ef2766d055mr6838229e0c.2.1718920558227; Thu, 20 Jun 2024 14:55:58 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <28a3990b-f0a4-4c4e-a14d-3eac3aa7fbce@gmail.com> <7d69ef65-4c16-4479-9239-46b6df20cac3@gmail.com> In-Reply-To: <7d69ef65-4c16-4479-9239-46b6df20cac3@gmail.com> Date: Thu, 20 Jun 2024 16:55:49 -0500 Message-ID: Subject: Re: [PHP-DEV] [RFC] [Vote] New ext-dom features in PHP 8.4 To: Niels Dossche Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000004542c1061b5961db" From: mweierophinney@gmail.com ("Matthew Weier O'Phinney") --0000000000004542c1061b5961db Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 20, 2024, 1:27=E2=80=AFPM Niels Dossche wrote: > On 20/06/2024 16:28, Matthew Weier O'Phinney wrote: > > > > > > On Mon, Jun 10, 2024 at 1:15=E2=80=AFPM Niels Dossche > 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 th= e > case. If I had to take a guess I'd say it's for simplicity sake. > > he/him > I can understand that from a browser perspective, but from PHP, where we might be manipulating HTML to send back to the client, having it readonly would be a pretty big hindrance. > --0000000000004542c1061b5961db Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Jun 20, 2024, 1:27=E2=80=AFPM Niels Dossche &l= t;dossche.niels@gmail.com>= ; wrote:
On 20/06/2024 16:28, Matth= ew Weier O'Phinney wrote:
>
>
> On Mon, Jun 10, 2024 at 1:15=E2=80=AFPM Niels Dossche <dossche= .niels@gmail.com <mailto:dossche.niels@gmail.com>> wr= ote:
>
>=C2=A0 =C2=A0 =C2=A0Hi internals
>
>=C2=A0 =C2=A0 =C2=A0I'm opening the vote of my RFC "New ext-do= m features in PHP 8.4".
>=C2=A0 =C2=A0 =C2=A0RFC link: https://wiki.p= hp.net/rfc/dom_additions_84 <https://wiki= .php.net/rfc/dom_additions_84>
>=C2=A0 =C2=A0 =C2=A0Voting runs until 24th of June 21:00 GMT+2.
>
>=C2=A0 =C2=A0 =C2=A0Kind regards
>=C2=A0 =C2=A0 =C2=A0Niels
>
>
> 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 bee= n 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= .
> he/him

I can understand that from a browser perspective, but from = PHP, where we might be manipulating HTML to send back to the client, having= it readonly would be a pretty big hindrance.=C2=A0
=
--0000000000004542c1061b5961db--