我有一个Chrome网络应用(托管应用),我需要让窗口无法调整大小。
这是我目前的manifest.json
:
{
"name": "Web app",
"description": "Description.",
"version": "0.0.1",
"app": {
"urls": [
"*://localhost/view/main"
],
"launch": {
"web_url": "http://localhost/view/main",
"container": "panel",
"height": 645,
"width": 800
}
},
"icons": {
"128": "favicon.png"
},
"permissions": [
"unlimitedStorage",
"notifications"
],
"manifest_version": 2
}
我可以设置初始大小,但我找不到修复方法。我该怎么办?
答案 0 :(得分:0)
将maxHeight,maxWidth和minHeight以及minWidth属性赋予"启动" object.so你可以修复chrome web app的窗口大小,并使其无法调整大小。 例如,
launch: {
"web_url": "http://localhost/view/main",
"container": "panel",
"height": 645,
"width": 800,
"minHeight":645,
"minWidth":800,
"maxHeight":645,
"maxWidth":800
}