i have problem obtaining globalPagefrom safari.extension inside injected script.
Every time i try to get it safari returns error in console:
TypeError: Result of expression 'safari.extension.globalPage' [undefined] is not an object.
Inside Global Page script i don’t have problem obtaining it.
Does any one of you know how to resolve this issue ?
Thanks
You can’t directly access globalPage from an injected script; you have to use message passing to access any globalPage objects. Read this section of the Safari Extensions Dev Guide. Comment if you need tips.