-
Notifications
You must be signed in to change notification settings - Fork 467
Removed reference to window and change to self #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed reference to window and change to self #116
Conversation
Removed reference to window and change to self. This is to allow the client to be used in Web Workers see: https://developer.mozilla.org/en/docs/Web/API/Window/self Signed-off-by: Tadhg Mulkern<[email protected]>
I cannot see why the build is failing |
It builds perfectly on my local machine, the build error seems to be about a plugin
|
Thanks for the contribution @tmulkern, just two changes please:
|
Updated Client-hareness.js, set global.window = global; to global.self = global;
Done and Done, thanks for the help @jpwsutton |
@jpwsutton the build is still failing with the original failure, any ideas? |
Update .travis.yml to fix build error, set nodejs version to use the latest stable version of 5.x
@jpwsutton fixed the problem with the build, nobody specified the version of nodejs to run in .travis.yml. This cause problems with the bundling, in the build log the plugins stated that they needed a version of node greater that 4.2 (see here)
So I set the version to be the latest version of 5.x |
@jpwsutton Instead of having the requirement for
How about setting this somewhere within: eval@67e92a9 |
* Removed reference to window and change to self (#116) * Removed reference to window and change to self Removed reference to window and change to self. This is to allow the client to be used in Web Workers see: https://developer.mozilla.org/en/docs/Web/API/Window/self Signed-off-by: Tadhg Mulkern<[email protected]> * Updated Client-hareness.js Updated Client-hareness.js, set global.window = global; to global.self = global; * Update .travis.yml to fix build error Update .travis.yml to fix build error, set nodejs version to use the latest stable version of 5.x * Refactored Properties using Object.defineProperties (#120) * Refactored Properties using Object.defineProperties Refactored Properties using Object.defineProperties as seen here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties This reduces the javascript code by removing repeated code. This will have a impact on overall file size. Signed-off-by: Tadhg Mulkern<[email protected]> * Added additional cleanup of code Added a piece of code to removed the need for all the Typed Array checks, base on this method https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView and from the Stackoverflow answer https://stackoverflow.com/questions/15251879/how-to-check-if-a-variable-is-a-typed-array-in-javascript/29651223#29651223 * Remove the needed for reversing arrays for processing Changed usages of push on this._buffered_msg_queue and this._msg_queue to use unshift https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift, removing the need to reverse the array to pop elements in fifo order Signed-off-by: Tadhg Mulkern<[email protected]> * Tweaking tests to run on travis. Signed-off-by: James Sutton <[email protected]> * Fix typo (#128) Signed-off-by: Nico Rikken <[email protected]> * Moving to eslint and setting consistent code style in paho-mqtt.js as well as improving build Signed-off-by: James Sutton <[email protected]> * Fixing tests to fully complete Signed-off-by: James Sutton <[email protected]> * Variable message should not be global Signed-off-by: Jannik Hunziker <[email protected]> * Function call should be local Signed-off-by: Jannik Hunziker <[email protected]> * Variable client should not be global Signed-off-by: Jannik Hunziker <[email protected]> * Variable client should not be global Signed-off-by: Jannik Hunziker <[email protected]> * Updating Utility to use Automatic Reconnect & have visible console Signed-off-by: James Sutton <[email protected]> * Fixing tests to work with updated interopability broker, updating .gitignore and readme. Signed-off-by: James Sutton <[email protected]> * Adding Travis badge and fixing typo. Signed-off-by: James Sutton <[email protected]> * Added subscribe/unsunbscribe support for multiple topics Signed-off-by: Michael Zak <[email protected]> * Fixing typo in PR and adding a test case Signed-off-by: James Sutton <[email protected]> * GDPR - Adding LocalStorage Warning to Utility Signed-off-by: James Sutton <[email protected]> * Brings Paho one step closer to be supported in non-browser environments. (#153) * Fix global object Signed-off-by: Manuel Iglesias <[email protected]> * Remove references to self Signed-off-by: Manuel Iglesias <[email protected]> * Fix arguments conversion to array Signed-off-by: Manuel Iglesias <[email protected]> * Use simple in-memory fake of localStorage when global one is not available Signed-off-by: Manuel Iglesias <[email protected]> * Updating version to 1.1.0 for Eclipse Photon Signed-off-by: James Sutton <[email protected]>
Removed reference to window and change to self. This is to allow the
client to be used in Web Workers see:
https://developer.mozilla.org/en/docs/Web/API/Window/self
Signed-off-by: Tadhg Mulkern[email protected]