Bug 218280 - MediaList.toString() returns [object MediaList]
Summary: MediaList.toString() returns [object MediaList]
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 14
Hardware: Mac macOS 10.15
: P2 Minor
Assignee: Nobody
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2020-10-28 05:21 PDT by Alexander
Modified: 2020-10-29 10:21 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!