[Webkit-unassigned] [Bug 224833] New: [GTK] API to list all anchors aka element ids / URL fragment/hash of the current page

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 20 14:53:47 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=224833

            Bug ID: 224833
           Summary: [GTK] API to list all anchors aka element ids / URL
                    fragment/hash of the current page
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: contact+bugs.webkit.org at hacktivis.me
                CC: bugs-noreply at webkitgtk.org

URL fragments: Anchors defined with the `id` (and formerly `name`) attribute in HTML, visible via `location.hash` in JavaScript.

This is possible to do right now via executing code in JavaScriptCore on page loads but it would probably be more efficient* to have a proper API endpoint to list the available fragments.

A use case for this would be to list fragments either in a menu or when completing the URL.

*: document.anchors seems to be only for the `name` attribute and I haven't found a better solution than going through each node and checking if they have an `id` attribute

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210420/210c4b22/attachment-0001.htm>


More information about the webkit-unassigned mailing list