Re: [whatwg/dom] Define processing instruction attributes (PR #1454)

WebReflection left a comment (whatwg/dom#1454)

to whom it might concern, a quick polyfill for this is here https://github.com/ungap/processing-instruction/blob/main/index.js but I wonder just one thing: are attributes observed at the MutationObserver level too or it's just a side effect for the fact that the `data` changes?

I don't want to go too greedy at the MutationObserver level because between setting explicitly data and changing attributes is basically indistinguishable from a user-land prospective unless tons of slow boilerplate is implemented + I wonder if, separately, anyone would be interested in a quick TreeWalker that finds comment nodes and replaces these with processedInstructions before further usage (most notably the template one, but also `innerHTML` or similar operations), thank you and congrats for the merge and tests and whatnot.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1454#issuecomment-4798551032
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1454/c4798551032@github.com>

Received on Thursday, 25 June 2026 11:05:11 UTC