Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hinting support for Shadow DOM nested elements #3001

Closed
wants to merge 2 commits into from

Commits on Jun 24, 2023

  1. Add hinting support for Shadow DOMs

    This commit contains the following changes:
    
    dom: Make Nyxt DOM Shadow DOM aware
    
    buffer: Add nyxt-identifier attribute to Shadow DOMs elements
    
    buffer: Add new attribute to identify Shadow Root elements
    The new attribute allows checking if the main DOM has any Shadow DOMs by using
    the browser API querySelector and similar functions, otherwise it would be
    necessary to loop through all elements and check if the property shadowRoot is
    not null.
    (See https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot)
    
    parenscript-macro: Add Shadow DOM aware recursive qsa like macro
    This macro allows querying elements behind Shadow DOMs which is normally not
    possible due to encapsulation.
    
    mode/hint: Search for elements recursively through Shadow DOMs
    
    parenscript-macro: Add Shadow DOM aware qs-nyxt-id like macro
    
    parenscript-macro: Make qs-nyxt-id JS friendly
    This commit is inspired by
    atlas-engineer@3fd4402
    It is reused to avoid compilation warning concerning undefined symbol
    nyxt/mode/hint::nyxt-identifier.
    
    dom: Get Interactive elements recursively through Shadow DOM
    
    mode/hint: Add hint overlays by nyxt-identifier
    
    parenscript-macro: Handle overlapped Shadow DOM child elements
    
    mode/document: Fix heading scrolling for pages that use Shadow DOMs
    heiwiper committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    1dcb775 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b855533 View commit details
    Browse the repository at this point in the history