Fix speculation rules warning caused by replaceAll() in Chrome #38

Open
opened 2025-06-29 15:19:13 -04:00 by jean · 1 comment
Owner

I don't know what is going on here. It doesn't usually appear, but the content script consistently errors when using String.replaceAll() for any page that uses Chrome's Speculation Rules API. What?

I don't know what is going on here. It doesn't usually appear, but the content script consistently errors when using `String.replaceAll()` for any page that uses Chrome's Speculation Rules API. What?
Author
Owner

The error is "Inline speculation rules cannot currently be modified after they are processed. Instead, a new

The error is "Inline speculation rules cannot currently be modified after they are processed. Instead, a new <script> element must be inserted." Zero search results.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jean/metamorpov#38
No description provided.