[Webkit-unassigned] [Bug 64587] New: Add support for retrieving an element in TreeScope by id to window.internals object.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 15 01:02:19 PDT 2011


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

           Summary: Add support for retrieving an element in TreeScope by
                    id to window.internals object.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hayato at chromium.org
                CC: dglazkov at chromium.org, rolandsteiner at chromium.org,
                    dominicc at chromium.org, morrita at google.com


It would be nice that we can get an element in nested TreeScope by specifying 'id' and 'owner element'. That enables us to write the following code in tests:

  function getElementInShadow(path)
  {
    var ids = path.split('/');
    var element = document.getElementById(ids[0]);
    for (var i = 1; i < ids.length; ++i) {
        element = window.internals.getElementByIdInShadowHost(element, ids[i]);
    }
    return element;
  }

  var inputA = getElementInShadow('shadowHost/shadowHost2/inputA');

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list