You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (via GitHub)" <gi...@apache.org> on 2024/02/25 22:37:56 UTC

[PR] feat: Add ResolveServiceWorkerRequests preference [cordova-android]

jcesarmobile opened a new pull request, #1696:
URL: https://github.com/apache/cordova-android/pull/1696

   Ionic webview plugin has had this preference for a few years, it makes possible for service worker requests to go through the asset loader.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] feat: Add ResolveServiceWorkerRequests preference [cordova-android]

Posted by "jcesarmobile (via GitHub)" <gi...@apache.org>.
jcesarmobile commented on code in PR #1696:
URL: https://github.com/apache/cordova-android/pull/1696#discussion_r1521318277


##########
framework/src/org/apache/cordova/engine/SystemWebViewClient.java:
##########
@@ -116,6 +118,18 @@ public SystemWebViewClient(SystemWebViewEngine parentEngine) {
         });
 
         this.assetLoader = assetLoaderBuilder.build();
+        boolean setAsServiceWorkerClient = parentEngine.preferences.getBoolean("ResolveServiceWorkerRequests", false);

Review Comment:
   I've set it to be the same default value as `cordova-plugin-ionic-webview` in case people is migrating from there, but if we want it to be `true` and it's not going to be released as a minor, I can change it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] feat: Add ResolveServiceWorkerRequests preference [cordova-android]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1696:
URL: https://github.com/apache/cordova-android/pull/1696#issuecomment-1963086065

   ## [Codecov](https://app.codecov.io/gh/apache/cordova-android/pull/1696?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 72.35%. Comparing base [(`4742358`)](https://app.codecov.io/gh/apache/cordova-android/commit/4742358601e892a8c8816ef8b1827dfdf7b3754e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`b5465c1`)](https://app.codecov.io/gh/apache/cordova-android/pull/1696?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1696   +/-   ##
   =======================================
     Coverage   72.35%   72.35%           
   =======================================
     Files          23       23           
     Lines        1834     1834           
   =======================================
     Hits         1327     1327           
     Misses        507      507           
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cordova-android/pull/1696?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] feat: Add ResolveServiceWorkerRequests preference [cordova-android]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on code in PR #1696:
URL: https://github.com/apache/cordova-android/pull/1696#discussion_r1504301121


##########
framework/src/org/apache/cordova/engine/SystemWebViewClient.java:
##########
@@ -116,6 +118,18 @@ public SystemWebViewClient(SystemWebViewEngine parentEngine) {
         });
 
         this.assetLoader = assetLoaderBuilder.build();
+        boolean setAsServiceWorkerClient = parentEngine.preferences.getBoolean("ResolveServiceWorkerRequests", false);

Review Comment:
   I feel like if this is going to be introduced in the 13.x release then we could default to `true` so that service workers just "works" out of the box.
   
   But I don't have a strong opinion to block this and I'm okay if this remains using `false` as a default.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] feat: Add ResolveServiceWorkerRequests preference [cordova-android]

Posted by "erisu (via GitHub)" <gi...@apache.org>.
erisu merged PR #1696:
URL: https://github.com/apache/cordova-android/pull/1696


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org