[Webkit-unassigned] [Bug 101309] New: [Shadow DOM]: Event retargeting doesn’t occur for document nodes distributed to the shadow insertion points

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 5 23:17:37 PST 2012


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

           Summary: [Shadow DOM]: Event retargeting doesn’t occur for
                    document nodes distributed to the shadow insertion
                    points
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: sgrekhov at unipro.ru


Run the following example.

<html>
<head>
<script>
function test() {
       var SR = window.ShadowRoot || window.WebKitShadowRoot;
    var d = document;

    var ul = d.querySelector('ul.stories');
    var s = new SR(ul);

    //make shadow subtree
    var div = d.createElement('div');
    div.innerHTML = '<ul id="ip_wrapper"><content select=".shadow"></content></ul>';
    s.appendChild(div);

       d.body.addEventListener('click', function (event) {
             alert('event.target.tagName=' + event.target.tagName);
    }, false);

    var event = d.createEvent('HTMLEvents');
    event.initEvent ("click", true, false);
    d.querySelector('#li3').dispatchEvent(event);             
}
</script>
</head>
<body onload="test()">
    <ul class='stories'>
        <li id='li1'><a href='#1'>Link1</a></li>
        <li id='li2' title="li2"><a href='#2'>Link 2</a></li>
        <li id='li3' class='shadow'><a href='#3'>Link 3 Shadow</a></li>
        <li id='li4' class='shadow2'><a href='#4'>Link 4 Shadow 2</a></li>
        <li id='li5'><a href='#5'>Link 5</a></li>
        <li id='li6' class='shadow'><a href='#5'>Link 6 Shadow</a></li>
    </ul>
</body>
</html>


This example shows tagName LI. But according http://www.w3.org/TR/shadow-dom/#event-retargeting (see steps 5 and 6 of event retargeting algorithm) UL (a shadow root) should be a relative target.

-- 
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