[Webkit-unassigned] [Bug 266846] MutationObserver doesn't observe style attribute change when resize element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 24 22:05:05 PST 2023


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

Karl Dubost <karlcow at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |BrowserCompat
                 CC|                            |karlcow at apple.com,
                   |                            |rniwa at webkit.org,
                   |                            |webkit-bug-importer at group.a
                   |                            |pple.com

--- Comment #1 from Karl Dubost <karlcow at apple.com> ---
This is happening on STP 184 on macOS.
The values are not dynamically adjusted.

The script in the attachment above:

```

function update_text(){
        resize_me.value=resize_me.getAttribute("style")
}

new MutationObserver(update_text).observe(resize_me,{
        attributes:true,
        attributeFilter:["style"]
})

resize_js_button.onclick=function(){
        resize_me.setAttribute("style","width:200px;height:100px")
}

update_text_button.onclick=update_text

```

Probably there is a need for WPT too. 
This should return a hit for Safari.

https://wpt.fyi/results/?label=master&label=experimental&aligned&q=mutationobserver%20safari%3Afail


old similar bug in https://stackoverflow.com/questions/57778941/reactjs-web-app-mutationobserver-use-in-safari-browser-not-as-expected

Maybe the MutationObserver reacts to the attribute change, but not to the value inside the attributes.


It doesn't fix the difference in between the browsers, but there is resizeObserver which should be working here.

-- 
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/20231225/0d157306/attachment.htm>


More information about the webkit-unassigned mailing list