fix: broaden shadow root dialog detection to any non-style element
The ewt-install-dialog tag name check was too strict — drop it and take the first non-style element child that appears in the shadow root, then poll _installState on it. This matches how the previous version found the dialog before we narrowed the check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f1a94ac4bd
commit
ab93db0489
1 changed files with 5 additions and 3 deletions
|
|
@ -569,7 +569,9 @@
|
|||
}, 100);
|
||||
}
|
||||
|
||||
// Watch for ewt-install-dialog to appear in the shadow root, then start polling.
|
||||
// Watch for the dialog element to appear in the shadow root, then start polling
|
||||
// _installState on it. Don't check for a specific tag name — just take the first
|
||||
// non-style element child that appears.
|
||||
var sr = installBtn.shadowRoot;
|
||||
if (sr) {
|
||||
dlgObserver = new MutationObserver(function (mutations) {
|
||||
|
|
@ -577,8 +579,8 @@
|
|||
var added = mutations[i].addedNodes;
|
||||
for (var j = 0; j < added.length; j++) {
|
||||
var node = added[j];
|
||||
if (node.nodeType === 1 &&
|
||||
node.tagName && node.tagName.toLowerCase() === 'ewt-install-dialog') {
|
||||
if (node.nodeType === 1 && node.tagName &&
|
||||
node.tagName.toLowerCase() !== 'style') {
|
||||
if (dlgObserver) { dlgObserver.disconnect(); dlgObserver = null; }
|
||||
startPolling(node);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue