Hi internals On 1/17/24 21:22, Niels Dossche wrote: > Hi internals > > I'm starting discussion of my RFC "Opt-in DOM spec-compliance". > > RFC link: https://wiki.php.net/rfc/opt_in_dom_spec_compliance > Pre-RFC pitch: https://externals.io/message/122048 > > Kind regards > Niels
I basically finished the implementation of the proposal. The only thing remaining is adding more tests, and fixing bugs if any come up. All WPT tests that I ported over (in a separate repo) pass as well. I dropped the importModernNode method from the proposal. Upon trying to implement this, I found that it was too difficult to make it work correctly due to limitations in the import code implementation. In particular, in old DOM, namespaces must always be attached to an element. But when importing a node with namespaced attributes, this could sometimes lose the namespace of those attributes because at that point the cloned subtree is not attached to the document yet. While it's probably possible to fix this for most cases, there will always be cases where this causes issues. As such, I rather not provide this functionality than provide it in a half-working/half-broken state. The reverse direction, importLegacyNode, does not suffer from this problem because we have our own namespace handling code for new DOM. TL;DR: importModernNode is gone, importLegacyNode remains. There has also been no discussion for quite some time now. So if nothing changes, I'd like to put it to vote on Tuesday 13-02. Kind regards Niels -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php