Bug 281277

Summary: css counter value is not incremented while adding textContent into the DOM
Product: WebKit Reporter: Karl Dubost <karlcow>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: m_dubet, rik, webkit-bug-importer, webkit.jiion, xavier
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://codepen.io/ffoodd/pen/bGXBaMM
Attachments:
Description Flags
testcase none

Karl Dubost
Reported 2024-10-10 20:39:30 PDT
Created attachment 472901 [details] testcase 1. With Safari 2. Open the testcase or https://codepen.io/ffoodd/pen/bGXBaMM 3. Look at the body Expected: The `test` string is every second. and the counter is incremented by 1. Safari: * test string is added * counter stays at 0 Firefox/Chrome * test string is added * counter is incremented by one at every iteration. The counter is defined by ``` body { counter-reset: test; } span { counter-increment: test; } body::after { content: counter(test); display: block; } ``` and the string is added by ``` setInterval(() => { const t = document.createElement('span'); t.textContent = 'test'; document.body.append(t); }, 1000); ```
Attachments
testcase (766 bytes, text/html)
2024-10-10 20:39 PDT, Karl Dubost
no flags
Radar WebKit Bug Importer
Comment 1 2024-10-10 20:39:41 PDT
Karl Dubost
Comment 2 2024-10-10 20:42:02 PDT
This bug was reported by Gaƫl Poupard on https://mastodon.cloud/@ffoodd@mamot.fr/113283173919966650
Note You need to log in before you can comment on or make changes to this bug.