1
votes

I am using kango extensions for browser plugin development.
I am trying to load file (simple.html) content that is inside plugin folder to browser page.
But I am getting this issue:

Denying load of chrome-extension://gkjiilcoknmmdcdpkepaiocmfkchgmhk/simple.html. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.send @ sandboxed-default-document-end.js:5 chrome-extension://invalid/ Failed to load resource: net::ERR_FAILED

This is code for it:

$("body").load(kango.io.getResourceUrl("simple.html"));
1
Is it listed in web_accessible_resources? - merlin2011
The error seems to be very specific about what is wrong. Have you add simple.html to the manisfest ? - João Mosmann
I am not sure what manifest is. In kango there is this file etension info (kangoextensions.com/docs/api-reference/KangoExtensionInfo.html). @merlin2011 where I can find this web_accessible_resources? - 1110
It is inside the manifest file. - merlin2011

1 Answers

3
votes

As per kango framework structure, resources must be placed in common/res directory.

Create 'res' folder under src/common folder.

Add your html file into it and then access that file using kango.io.getResourceUrl("res/simple.html");

Click here for more details.