@mrozbarry This was the solution we came up with during the growth session to debug this, and seemed to allow the timer page to load and work again in the plugin. If there might be a better way to solve this, let's set up another growth session to explore it 😄
Problem:
The intelliJ mobtime plugin uses the chromium embedded framework under the hood (through JBCef), and it seems that window.Notification is not supported by chromium browsers (assumption from here: https://developer.mozilla.org/en-US/docs/Web/API/notification), but we are trying to access a permission property from window.Notification,
this causes the plugin to show a blank screen when mobtime errors out:
Mobtime source:
In timer.js, the externals object is defined:
app({
init: actions.Init(null, {
timerId: initialTimerId,
externals: {
documentElement: window.document,
Notification: window.Notification, // window.Notification does not seem to be defined for chromium-based browsers
storage: window.localStorage,
location: window.location,
history: window.history,
},
dark: 'dark' in flags,
})
and in public/actions.js, we try assessing externals.Notification.permission:
@mrozbarry This was the solution we came up with during the growth session to debug this, and seemed to allow the timer page to load and work again in the plugin. If there might be a better way to solve this, let's set up another growth session to explore it 😄
Problem:
The intelliJ mobtime plugin uses the chromium embedded framework under the hood (through JBCef), and it seems that
window.Notification
is not supported by chromium browsers (assumption from here: https://developer.mozilla.org/en-US/docs/Web/API/notification), but we are trying to access apermission
property fromwindow.Notification
, this causes the plugin to show a blank screen when mobtime errors out:Mobtime source: In
timer.js
, theexternals
object is defined:and in
public/actions.js
, we try assessingexternals.Notification.permission
:and
Solution:
Check that
externals.Notification
is defined before accessing thepermission
property:and