Closed Bug 1643915 Opened 5 years ago Closed 2 months ago

inspector webcomponent shadowroot is hidden

Categories

(DevTools :: Inspector, defect, P3)

77 Branch
defect

Tracking

(firefox149 fixed)

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: asztrik35, Assigned: kian)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

created a webcomponent but called an async init function (without await) in the constructor. the init function get files so the shadowroot is later attached, only after element appended. during this i had inspector open.

Actual results:

inspector didn't detect the shadowroot attach, only reopening devtools shows shadowroot dom

Expected results:

the shadowroot dom exposed to inspector as it is open

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Inspector
Product: Firefox → DevTools

Would need to try to reproduce.

Severity: -- → S3
Type: enhancement → defect
Priority: -- → P3
Attached file example.html

Sorry, I don't think I have the original file anymore, but I generated one with chatgpt, the bug is still present in this example HTML file.

This allows the client to be notified when a node gets children as a result of the shadow root being attached. Currently, the client will reuse the cached value of numChildren from when the devtools were initially opened, which may result in the node not being able to be expanded within the inspector.

Test case from the bug: https://bug1643915.bmoattachments.org/attachment.cgi?id=9523943

If you load the page, open your devtools, and then reload the page, the my-async node loses the expand icon and you are unable to view any children nodes. If you then close and reopen the devtools, everything is present again.

I updated the browser_markup_shadowdom_dynamic test since (as far as I could tell) it's testing the same functionality of inspector updates on shadow DOM attachment, but I'm happy to create a new test for it if that's preferred!

Assignee: nobody → kian
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: