i'm trying to create a safari extension and i'm stuck with something.
I have my global.html on my extension and i've been searching the web for like 3hours on how to retrieve the full html code without success.
I tried:
document.getElementsByTagName('html')[0].innerHTML
(when i alert i only see the code that i have inside my global.html)
document.documentElement.innerHTML
(nothing happens)
etc...
I used safari.application.activeBrowserWindow.activeTab.url
to retrieve the url but i cant get the html code.
Any help?
Thank you
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
You can't get the HTML of a web page from your extension's global page. You have to use an injected script and then, if you want, you can pass the web page's HTML to your global page using
safari.self.tab.dispatchMessage
. See this chapter in Apple's documentation.