-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
ci failure is from the docs... |
src/support/has.ts
Outdated
@@ -173,7 +173,7 @@ add('es6-weakmap', () => { | |||
|
|||
/* Miscellaneous features */ | |||
add('microtasks', () => has('es6-promise') || has('host-node') || has('dom-mutationobserver'), true); | |||
add('postmessage', () => typeof global.postMessage === 'function', true); | |||
add('postmessage', () => typeof global.window !== 'undefined' && typeof global.postMessage === 'function', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that it is a big deal, but it would be nice to add a comment here as to why we are doing the check this way, for future generations (think of the kids!), as it is non-obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a blurb.. you know, for the children.
|
||
const baseUrl = location.origin; | ||
const dfd = this.async(10000); | ||
const blob = new Blob([ `(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android 4.4.4 supports WebWorkers but doesn't support Blob creation this way. Again, not a big deal, but maybe add a simply blob check too?
Also, this might be a good pattern for doing these tests (thank you!) and might want to consider opening an issue on test-extras to add this as some sort of helper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up adding a simple global.Blob === undefined
instead of a real Blob has check. The real Blob check is in core
and has a few dependencies that we'd also have to copy over. Maybe that would be worth while at some point?
Type: bug
The following has been addressed in the PR:
Description:
The
queueTask
method is broken right now if you are running from a web worker. This is because it's usingpostMessage
(since it's available) butpostMessage
doesn't work like expected (it posts to the parent window in a web worker) and the tasks never get executed.Resolves #107