Bug 218280

Summary: MediaList.toString() returns [object MediaList]
Product: WebKit Reporter: Alexander <shutovby>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Minor CC: eric.carlson, smoley
Priority: P2 Keywords: DoNotImportToRadar
Version: Safari 14   
Hardware: Mac   
OS: macOS 10.15   

Description Alexander 2020-10-28 05:21:06 PDT
MediaList.toString() should be equal to MediaList.mediaText.

Example:
    var style = document.createElement('style');
    style.textContent = '@media screen, print {}';
    document.body.append(style);
    style.sheet.cssRules[0].media.toString();

Returns "[object MediaList]" in Safari and "screen, print" in Chrome and Firefox.
Comment 1 Smoley 2020-10-28 11:13:18 PDT
Thanks for filing, I can reproduce this on Safari 14.0.1 beta, but this appears to fixed in STP115 (Safari 14.1). Are you still able to reproduce it there?
Comment 2 Alexander 2020-10-28 22:31:19 PDT
(In reply to Smoley from comment #1)
> Thanks for filing, I can reproduce this on Safari 14.0.1 beta, but this
> appears to fixed in STP115 (Safari 14.1). Are you still able to reproduce it
> there?

Hi Smoley, I can confirm it is already fixed in Safari Technical Preview.
Comment 3 Smoley 2020-10-29 10:21:48 PDT
Great, thanks!