Bug 249637 - browserbench.org: illegal invocation of HTMLImageElement.prototype.srcset
Summary: browserbench.org: illegal invocation of HTMLImageElement.prototype.srcset
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: Other
Hardware: Unspecified All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-19 23:58 PST by tophf
Modified: 2022-12-26 23:59 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tophf 2022-12-19 23:58:46 PST
1. open browserbench.org
2. check the console

Expected: no errors
Observed: "Uncaught TypeError: Illegal invocation"

The cause is this problematic code in index.html added five years ago in bug 172049:

    if (!HTMLImageElement.prototype.srcset) {

Suggesting a possible fix:

    if (!('srcset' in HTMLImageElement.prototype)) {
Comment 1 Radar WebKit Bug Importer 2022-12-26 23:59:16 PST
<rdar://problem/103721986>