Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Creating new window in webExtension failes in Firefox ESR

  • 6 件の返信
  • 1 人がこの問題に困っています
  • 1 回表示
  • 最後の返信者: bmossavari

more options

I'm trying to create a new window in WebExtension (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create) by using code below:

var creating = browser.windows.create();

As documentation said "createData" object is optional, above code works on Firefox quantum(57.0.0), but it fails in Firefox ESR (52.5.0) with below error:

createData is null

I'm trying to create a new window in WebExtension (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create) by using code below: var creating = browser.windows.create(); As documentation said "createData" object is optional, above code works on Firefox quantum(57.0.0), but it fails in Firefox ESR (52.5.0) with below error: createData is null

この投稿は bmossavari により に変更されました

選ばれた解決策

More generally, there is extension developer support over here:

https://discourse.mozilla.org/c/add-ons/development

This forum focuses on end-user issues.

この回答をすべて読む 👍 1

すべての返信 (6)

more options

Hello, this is because Firefox 57 is more optimized for WebExtensions. Firefox 52 ESR was back when Firefox had more support for old XUL based 'legacy' add-ons.

more options

Thank you Mkll, I know firefox ESR supports legacy addons, but I think it should supports WebExtension too and it did (other parts of my addons works as expected only create window return 'createData is null' ) Maybe it's a bug in browser.window.create API, maybe i should report it as a bug on bugzilla

more options

When Firefox 52 ESR was released not all all the new API's needed for WebExtensions were completed. Version by version the new API's were added, and the older API's were deprecated.

bmossavari said

Maybe it's a bug in browser.window.create API, maybe i should report it as a bug on bugzilla

Have you tested it in Firefox 57? Don't report it as a bug if it works in 57.

more options

What happens if you pass an empty object:

var creating = browser.windows.create({}); 

Not that you should have to, just wondering whether Firefox is looking for something in particular and that might provide a more helpful error message.

For reference: https://developer.mozilla.org/Add-ons/WebExtensions/API/windows/create

この投稿は jscher2000 - Support Volunteer により に変更されました

more options

選ばれた解決策

More generally, there is extension developer support over here:

https://discourse.mozilla.org/c/add-ons/development

This forum focuses on end-user issues.

more options

Thank you jscher2000 for clarification

jscher2000 said

What happens if you pass an empty object: var creating = browser.windows.create({}); Not that you should have to, just wondering whether Firefox is looking for something in particular and that might provide a more helpful error message. For reference: https://developer.mozilla.org/Add-ons/WebExtensions/API/windows/create

passing empty object did the trick