Skip to content

Commit 06ba757

Browse files
committed
Remove use of String.prototype.at
This fixes an issue in Konqueror and Falkon, where `String.prototype.at` is not defined. Also: Update examples
1 parent f38927e commit 06ba757

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@exact-realty/lot",
3-
"version": "0.0.20",
3+
"version": "0.0.21",
44
"description": "Sandbox for isolating ECMAScript code",
55
"main": "dist/index.cjs",
66
"types": "dist/index.d.cts",

src/untrusted/lib/hardenGlobals.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,15 @@ const disableURLStaticMethods = () => {
210210
['writable']: true,
211211
['enumerable']: true,
212212
['configurable']: true,
213-
['value']: String.bind(null),
213+
['value']: function () {
214+
return '';
215+
}.bind(null),
214216
},
215217
['revokeObjectURL']: {
216218
['writable']: true,
217219
['enumerable']: true,
218220
['configurable']: true,
219-
['value']: String.prototype.at.bind(''),
221+
['value']: function () {}.bind(null),
220222
},
221223
});
222224
};

0 commit comments

Comments
 (0)