Hello,We are wrapping an ExtJS5 app into a chrome app. We are facing some difficulties and here are the steps we're following:
- Let's create a normal ExtJS5 app with sencha architect.
- Let's create a chrome manifest, containing the following code
Code:
"app": {
"background": {
"scripts": ["background.js"]
}
},- Let's create a background.js which will actually load the file index.html of the Sencha app.
At this point, we don't wrap the ExtJS app into an iframe, because we're not going to make use of the chrome APIs right away.Code:
chrome.app.runtime.onLaunched.addListener(function(launchData) { chrome.app.window.create(
'index.html',
{
id: 'mainWindow',
bounds: {width: 800, height: 600}
}
);
});
When launching this app, we get the following error:
XMLHttpRequest cannot load chrome-extension://miegfapidhkikpcmkbdchpnjpcdnmmje/build/production/QualityApp/app.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Can anyone explain what we're missing?
We got inspired by the following resources:We attached to this post the manifest.json, background.js and index.html we're talking about above.
How to make a chrome app with ExtJS5
Aucun commentaire:
Enregistrer un commentaire