-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: BREAKING Make WebVitals a Plugin (#45)
This removes all the optional/nullable stuff we have to add to parts of Portals code. If a user wants or needs WebVitals output for their portals, they can add it as an instance plugin on the portal. This also makes initialContext on Android a JavascriptInterface call instead of setting window.portalInitialContext on the window. I personally noted some scenarios where initialContext was not always there. I believe this due to the nature of how we had to evaluateJavascript on the webview every time a url was loaded. The JavascriptInterface method makes this always available. --------- Co-authored-by: Carl Poole <carl@ionic.io>
- Loading branch information
1 parent
40161b2
commit 151b1c4
Showing
8 changed files
with
1,406 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,3 +81,7 @@ lint/tmp/ | |
|
||
# Android Profiling | ||
*.hprof | ||
|
||
# Web | ||
node_modules/ | ||
vitals/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Building | ||
```bash | ||
npm install | ||
npm run build | ||
``` | ||
|
||
## Updating JS string in source | ||
If updating web-vitals is necessary run the build instructions above and then copy the output: | ||
|
||
```bash | ||
cat dist/index.js | pbcopy | ||
``` | ||
|
||
Then paste the contents into the script source in `WebVitals.kit` in the `js` property. | ||
This is not anticipated to be updated frequently, so no automation or code generation has been done for this. |
Oops, something went wrong.