Skip to content

Conversation

jonathanKingston
Copy link
Contributor

@jonathanKingston jonathanKingston commented Oct 10, 2025

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/72649045549333/task/1211605042641498?focus=true

Description

  • Add support for shadow dom
  • Add support for iframes
  • Migrate settings to be an object to reduce passed settings
  • Splits out child collection into it's own method
  • Adds a hard cap on depth recursion to prevent overflow (temp measure for now).

Testing Steps

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Adds shadow DOM and same-origin iframe content collection and refactors DOM-to-markdown to use a settings object with max depth/length controls.

  • Content extraction
    • Add shadow DOM support by traversing node.shadowRoot.childNodes in domToMarkdown.
    • Add same-origin iframe support via getSameOriginIframeDocument and iframe handling in domToMarkdown (gated by includeIframes).
  • API refactor
    • Change domToMarkdown(node, settings, depth) replacing positional args; introduce DomToMarkdownSettings (maxLength, maxDepth, excludeSelectors, includeIframes).
    • Extract child traversal to domToMarkdownChildren with depth/length checks.
  • Integration
    • Update getMainContent() to call domToMarkdown with settings, include new maxDepth option, and structured truncation logging.

Written by Cursor Bugbot for commit 1759698. This will update automatically on new commits. Configure here.

Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 1759698
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/68e90f134741df00088fc6be
😎 Deploy Preview https://deploy-preview-2002--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

github-actions bot commented Oct 10, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

Copy link

github-actions bot commented Oct 10, 2025

[Beta] Generated file diff

Time updated: Fri, 10 Oct 2025 13:51:01 GMT

Apple
    - apple/contentScope.js

File has changed

Integration
    - integration/contentScope.js

File has changed

Windows
    - windows/contentScope.js

File has changed

@jonathanKingston jonathanKingston marked this pull request as ready for review October 10, 2025 12:40
@jonathanKingston jonathanKingston requested a review from a team as a code owner October 10, 2025 12:40
@jonathanKingston jonathanKingston changed the title Jkt/support shadow dom Page collection support shadow dom and frames Oct 10, 2025
cursor[bot]

This comment was marked as outdated.

@jonathanKingston
Copy link
Contributor Author

@shakyShane one more, hopefully that's it for edge cases. As this is internal only currently I'll be writing tests soon for the whole process but continue to just validate on my machine™.

@jonathanKingston jonathanKingston added this pull request to the merge queue Oct 10, 2025
Merged via the queue into main with commit 14f2c52 Oct 10, 2025
24 checks passed
@jonathanKingston jonathanKingston deleted the jkt/support-shadow-dom branch October 10, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants