This is a clone of SerenityOS/serenity#23240
Simplified reproduction:
function foo() {}
foo.arguments
Original issue:
1280.563 WebContent(1164): Unhandled JavaScript exception: [TypeError] Restricted function properties like 'callee', 'caller' and 'arguments' may not be accessed in strict mode
1280.563 WebContent(1164): at <unknown>
at WodItem (https://darkveil.world-of-dungeons.net/wod/javascript/orders.js?1702062237:224:16)
at https://darkveil.world-of-dungeons.net/wod/javascript/orders.js?1702062237:293:17
=> https://darkveil.world-of-dungeons.net/wod/javascript/orders.js
function WodItem(id, name, classes, ammoClassIds, equipped, equipped_sockets, unequipped_sockets) {
if (WodItem.arguments.length == 1) { // <- Error happens here
if (THE_ENV.items[id]) {
return THE_ENV.items[id]
} else {
this.id = id
this.name = WOD_STR.Wod.item.unknown
this.equipped = false
this.classes = classes
this.ammoClassIds = ammoClassIds
this.equipped_sockets = false
}
} else {
this.id = id
this.name = (equipped?'' : '!! ') + name
this.classes = classes
this.ammoClassIds = ammoClassIds
this.equipped = equipped
this.equipped_sockets = equipped_sockets
this.unequipped_sockets = unequipped_sockets
}
}
Neither the file nor the function use strict mode. The code obviously works in Firefox.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too