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

Open
opened 2025-06-29 12:19:13 -07: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 labels
No milestone
No project
No assignees
1 participant
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.