-
Notifications
You must be signed in to change notification settings - Fork 32
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
Work in env without window.location #110
Conversation
Environments like React Native don't have a window.location. In such an environment, boot-reload fails because window.location.hostname or .protocol does not exist. Use some-> to avoid these exceptions.
At some point there was a PR doing something similar to support this for
webworkers. Maybe that's not released yet but already solved somewhere in
the codebase..?
…On Sat, 24 Dec 2016 at 21:46, Paulus Esterhazy ***@***.***> wrote:
Environments like React Native don't have a window.location. In such an
environment, boot-reload fails because window.location.hostname or
.protocol does not exist. Use some-> to avoid these exceptions.
------------------------------
You can view, comment on, or merge this pull request online at:
#110
Commit Summary
- Work in env without window.location
File Changes
- *M* src/adzerk/boot_reload/client.cljs
<https://github.com/adzerk-oss/boot-reload/pull/110/files#diff-0> (2)
- *M* src/adzerk/boot_reload/reload.cljs
<https://github.com/adzerk-oss/boot-reload/pull/110/files#diff-1> (2)
Patch Links:
- https://github.com/adzerk-oss/boot-reload/pull/110.patch
- https://github.com/adzerk-oss/boot-reload/pull/110.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#110>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAF82ITxsGzKxegThK56diTR30Pfygmoks5rLSIxgaJpZM4LVOpD>
.
|
In any case this change is not very invasive and I can't think of a way in
which this could break existing code.
…On Dec 24, 2016 15:20, "Martin Klepsch" ***@***.***> wrote:
At some point there was a PR doing something similar to support this for
webworkers. Maybe that's not released yet but already solved somewhere in
the codebase..?
On Sat, 24 Dec 2016 at 21:46, Paulus Esterhazy ***@***.***>
wrote:
> Environments like React Native don't have a window.location. In such an
> environment, boot-reload fails because window.location.hostname or
> .protocol does not exist. Use some-> to avoid these exceptions.
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> #110
> Commit Summary
>
> - Work in env without window.location
>
> File Changes
>
> - *M* src/adzerk/boot_reload/client.cljs
> <https://github.com/adzerk-oss/boot-reload/pull/110/files#diff-0> (2)
> - *M* src/adzerk/boot_reload/reload.cljs
> <https://github.com/adzerk-oss/boot-reload/pull/110/files#diff-1> (2)
>
> Patch Links:
>
> - https://github.com/adzerk-oss/boot-reload/pull/110.patch
> - https://github.com/adzerk-oss/boot-reload/pull/110.diff
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#110>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AAF82ITxsGzKxegThK56diTR30Pfygmoks5rLSIxgaJpZM4LVOpD>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#110 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGfWGGMXvtBUpI2UfUz_HKxepr_OWExks5rLSo3gaJpZM4LVOpD>
.
|
Probably this doesn't break anything. But does this fix anything either? with React-native or other environments? The reload mechanism currently only loads the files by appending |
@Deraen, yes! We've been using boot-reload very happily in boot-react-native for a year or more. We have code that patches Google Closure's mechanism with a custom eval-based js loader: The context of this PR: We currently shim |
Okay, makes sense. |
Environments like React Native don't have a window.location. In such an
environment, boot-reload fails because window.location.hostname or
.protocol does not exist. Use some-> to avoid these exceptions.