1110
1110

Reputation: 6839

Can't load html file in page via javascript

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"));

Upvotes: 1

Views: 1148

Answers (1)

Abhijit Dhobale
Abhijit Dhobale

Reputation: 31

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.

Upvotes: 1

Related Questions