windows.create() promise will never be fulfilled
See original GitHub issueSnippet from this example: https://github.com/mdn/webextensions-examples/blob/master/window-manipulator/window.js#L28
let creating = browser.windows.create(createData);
creating.then(() => {
console.log("The normal window has been created");
});
I cant see console.log
message while i am inspecting this extension.
I only see such messages:
Navigated to chrome://devtools/content/shared/webextension-fallback.html
Webconsole context has changed
It seems that this promise will never be fullfiled. Looks like a bug in WebExtensions API because examples from MDN don’t work too.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Fulfill (don't resolve) promise with another promise
This solution works if you already know that val is a promise. If you cannot make any assumptions about val 's type, then...
Read more >windows.create() - Mozilla - MDN Web Docs
A Promise that will be fulfilled with a windows.Window object containing the details of the new window. This Window object will always have...
Read more >JavaScript Promises: an introduction - web.dev
fulfilled - The action relating to the promise succeeded ... The JavaScript promises API will treat anything with a then() method as ...
Read more >Implementing - Promises
var PENDING = 0; var FULFILLED = 1; var REJECTED = 2; function Promise() ... A promise must never be fulfilled with another...
Read more >Working with promises in R
The promise library guarantees that only one of onFulfilled or onRejected will be called, never both. And a callback will never be invoked...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rebloor I just closed Bug 1593504 as invalid because this behavior is expected, but we should also fix the window-manipulator example accordingly, see:
Thanks @chrisdavidmills, I’ll probably go for duplicating as I would prefer to have a single definitive list.