Skip to content

Help me get my TabContentScript working again #8414

Answered by boek
gutley asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @gutley

Could you try and replace

return WKUserScript(source: endScript, injectionTime: .atDocumentEnd, forMainFrameOnly: true)

with

return WKUserScript.createInDefaultContentWorld(source: endScript, injectionTime: .atDocumentEnd, forMainFrameOnly: true)

If that doesn't work you could try

return WKUserScript.createInPageContentWorld(source: endScript, injectionTime: .atDocumentEnd, forMainFrameOnly: true)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gutley
Comment options

Answer selected by gutley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants