Search code examples
htmlsafari-extension

How can I open the html file on safari extension


I'm creating a safari extension.

I know how to open the URL.

like this

var newWin = safari.application.openBrowserWindow();

newWin.activeTab.url = "www://someSite.co.jp";

But, how can I open the file made by myself in the way like the mentioned example?


Solution

  • someTab.url = safari.extension.baseURI + myFilePath

    AccessingResourcesWithinYourExtensionFolder