문제

In my Main.js

const { getMostRecentBrowserWindow } = require('sdk/window/utils');
var chromewin = getMostRecentBrowserWindow();
chromewin.PrintUtils.printPreview(chromewin.PrintPreviewListener);

Browser console warning: "Module: .../main has no authority to load: sdk/window/utils"

도움이 되었습니까?

해결책

Your addon contains a corrupted or otherwise incomplete harness-options.json. Either rebuild your addon with a fresh copy of Addon SDK, or (more tricky) manually edit harness-options.json so that under the requirements section all required modules are listed.

다른 팁

Hmm I would try this instead:

const { getMostRecentBrowserWindow } = require('sdk/window/utils');
getMostRecentBrowserWindow().PrintUtils.printPreview(getMostRecentBrowserWindow().PrintPreviewListener);

My guess is that you are trying to use your chromewin ref after that window has closed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top