본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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