Closed Wikunia closed 9 years ago
I am using the native JS Promise API and on my Brackets that works. I was not aware, that there were multiple environments to support.
Hmmm when I use promises I always use the jQuery Deferred ones
Looks like an ECMA 6 feature which maybe isn't support on my version of Brackets (no idea why) https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Promise
Yes, I use the jQuery ones for other web development where I have to care for different browsers and versions.
But I was under the impression that if it runs in my Brackets it would run in any. I am using version 1.4 and Promises are defined.
I am using 1.5.0 (9acc39753) so a very new version.
The problem is that I am using Linux. I've chatted with Marcel Gerber and he said that Linux is running an old version of Chrome which doesn't support ECMA 6, yet.
I have added a polyfill for Promise in e9273268d0f8c6e798178912bd3b7da6b79f8b04. Can you check if it works now on Linux please?
Unfortunately I am getting this error now:
[Extension] failed to load /home/ole/.config/Brackets/extensions/user/hirse.ungit - ReferenceError: Promise is not defined ErrorNotification.js:125
ReferenceError: Promise is not defined
at Object.<anonymous> (file:///home/ole/.config/Brackets/extensions/user/hirse.ungit/main.js:18:25)
at Object.context.execCb (file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:1658:33)
at Object.Module.check (file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:869:55)
at Object.<anonymous> (file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:1121:34)
at file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:132:23
at file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:1164:21
at each (file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:57:31)
at Object.Module.emit (file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:1163:17)
at Object.Module.check (file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:925:30)
at Object.<anonymous> (file:///opt/brackets/dev/src/thirdparty/requirejs/require.js:1121:34)
Ah I see you forgot a var
then it works ;) Thanks!
Btw is it possible to scroll to the top when clicking on the menu button?
About scrolling:
The idea was that the viewer keeps the state it had when you closed it.
(You can still jump to the top with the Home
-key as in other websites)
Yes it's fine but the standard should be scroll to top ;)
Hi Jan,
the finished is better now but maybe just close the window to show that it is installed? :/ Unfortunately there is a bug in your new version:
Uncaught ReferenceError: Promise is not defined main.js:61