Skip to content

DOM inspector #407

@gorhill

Description

@gorhill

Losing track of all that is left to do... I need to write down everything I can think of:

  • Combine dom-highlight.js and dom-layout.js into dom-inspector.js
    • Rename dom-fingerprint.js scriptlet to dom-inspector-poke.js, which returns the session id.
      • When logger sees a mismatch with the last saved session id, this means dom-inspector.js need to be flushed+reinjected.
  • Incremental rendering of DOM tree (important)
    • To preserve layout across refresh (preserve node identity)
    • For efficiency (side effect)
    • Challenging
  • Commit dialog (modal)
    • Derive cosmetic filters from all changes
    • In textarea -- let user edit manually, reflect any changes in real time
    • Like with element picker, prepend date/url once for all filters
  • Toolbar
    • Commit button
    • Revert button
    • Allow inverted rendering mode for convenience
  • Quirks
    • Reset DOM highlighter when tab selector auto reset to All
    • DOM fingerprint: take into account uBlock's own node(s)
    • Toolbars not sticky on Firefox
    • Disabling a specific cosmetic filter needs to un-hide all nodes which are affected by the filter.
    • Issue to solve: some code in the DOM inspector may take longer to execute than the timeout period of the caller (example: inspecting https://dom.spec.whatwg.org/#mutation-observers with Firefox 38).
    • Investigate/fix Firefox webext issue with Dom inspector scriptlet injection
    • Add whatever comes up
  • Provide a collapsible overview of all cosmetic filters used on the page at the top so that one can toggle filters without having to drill down the DOM tree.
  • Replace use of built-in scrollIntoView with custom solution. The current behavior of scrollIntoView is not compatible with the desirable behavior in the DOM inspector.
    • No auto-scrolling should take place if the element is already in the viewport
    • When auto-scrolling is necessary, the target element should be vertically centered
    • Need a minimal size for element with a zero dimension

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions