w3c / w3c/webdriver

[Feature Request] GET current document DOM structure.

Open
#1,432 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

I would like to propose a new endpoint that will return the DOM of the current document as it appears in the DevTools, Shadow-DOM and everything included.

Currently there's the Get Page Source endpoint, but it returns the actual source, ignoring Frames, Shadow-DOM, etc.

This would help examining a webpage structure without the need for JavaScript execution.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing Get Page Source endpoint and the WebDriver specification entry points for page inspection. Define how a new endpoint would represent the current document, including frames and Shadow DOM, and how it differs from source retrieval. Done means the endpoint behavior and returned DOM structure are specified clearly enough for interoperable implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.