- From: Mason Freed <notifications@github.com>
- Date: Thu, 20 Apr 2023 11:48:07 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 20 April 2023 18:48:13 UTC
This was just discussed in the [Web Components F2F](https://github.com/WICG/webcomponents/issues/978#issuecomment-1471288572), and the general consensus was that there should be a way to detect when the closing tag of an element is parsed. One suggestion was made that might mitigate the concern that this will encourage authors to ignore subsequent changes to children: rather than a new event or callback, add a field to [MutationRecord](https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord) that can be used to detect whether an element's closing tag has been parsed. This would seem to meet the use case, and it would also happily not present any performance issues, since mutation records are delivered asynchronously and the timing is well defined. As a strawperson proposal: - **MutationRecord.closingTagParsed** - Read only boolean, which is `false` only when the closing tag for `MutationRecord.target` has not yet been parsed by the HTML parser. Will be `true` when the closing tag has already been parsed, or in the case that the element was imperatively added (e.g. via `appendNode()`). -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/809#issuecomment-1516789211 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/809/1516789211@github.com>
Received on Thursday, 20 April 2023 18:48:13 UTC