[Webkit-unassigned] [Bug 197868] New: getElementsByClassName and set outerHTML: later elements in array are not reachable

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 13 20:22:49 PDT 2019


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

            Bug ID: 197868
           Summary: getElementsByClassName and set outerHTML: later
                    elements in array are not reachable
           Product: WebKit
           Version: Safari 12
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: alvin_signups at icloud.com

Created attachment 369817

  --> https://bugs.webkit.org/attachment.cgi?id=369817&action=review

Demo of the bug

While (a) iterating on a group of elements from document.getElementsByClassName and (b) setting outerHTML for each element, latter elements become inaccessible in an ascending for-loop.
This is only triggered for outerHTML, not for innerHTML.

Current workaround
- Iterate in descending order or use innerHTML instead.

-- 
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/20190514/12bd5090/attachment.html>


More information about the webkit-unassigned mailing list