I want use the Safari Extension to decorate the window.fetch function, But No matter how I try, I can't get the fetch function to execute correctly. I was going through the documentation: https://developer.apple.com/documentation/safariservices/using-injected-style-sheets-and-scripts
and found this sentence:
"Injected scripts have an implied namespace — you don’t have to worry about your variable or function names conflicting with those of the website author, nor can a website author call functions in your extension. In other words, injected scripts and scripts that you include in the webpage run in isolated worlds, with no access to each other’s functions or data."
Does this mean I can't modify the window object in the content script just like a Chrome extension does with the webpage?
BTW, In chrome I use chrome.scripting.executeScript API, and in
plasmo I just use world: "MAIN" content script's config to achieved this feature.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
This browser extension is a doc reading enhancer for the Apple Developer website.
It supports i18n translation, hover link previews, and bilingual display.
Currently, it supports four languages: ja-JP, ko-KR, zh-CN, and zh-TW.
It works with Swift/SwiftUI/Foundation modules now, and it's expected to support Swift Test, Swift Charts, UIKit, Swift Playground, and XCode modules by the end of this month.
For more info, check out: https://appledocs.dev.
You can also visit https://appledocs.dev/progress to see translation progress and vote.
Note: It's only works on Chrome、Edge(In review)、Firefox(In review)
Screenshot:
Topic:
Developer Tools & Services
SubTopic:
General
Tags:
Swift Packages
Developer Tools
Safari Extensions
Apple Intelligence