Skip to content
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

Attempt to fix #80 #82

Merged
merged 2 commits into from
Sep 2, 2017
Merged

Attempt to fix #80 #82

merged 2 commits into from
Sep 2, 2017

Conversation

leoiii12
Copy link
Contributor

No description provided.

}

private get isIonicWKWebView(): boolean {
return this.isWKWebView && location.host === 'localhost:8080';
if (this.isWKWebView) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather make this method do this:

return this.isWKWebView && (location.host === 'localhost:8080'  || (<any>window).LiveReload);

Then we can remove declare var LiveReload;

@@ -67,11 +69,28 @@ export class ImageLoader {
}

private get isWKWebView(): boolean {
return this.platform.is('ios') && (<any>window).webkit;
if (this.platform.is('ios') && (<any>window).webkit && (<any>window).webkit.messageHandlers) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why do we need webkit.messageHandlers ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know whether it is necessary or not. When I was inspecting the issue with Livereload, I saw people are using with webkit.messageHandlers.
https://stackoverflow.com/questions/28795476/detect-if-page-is-loaded-inside-wkwebview-in-javascript
Therefore, I made this change.

@ihadeed ihadeed merged commit 7ff88be into zyra:master Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants