{"id":23456410,"url":"https://github.com/kunder-lab/cl.kunder.webview","last_synced_at":"2025-04-14T01:54:40.740Z","repository":{"id":29954358,"uuid":"33500992","full_name":"kunder-lab/cl.kunder.webview","owner":"kunder-lab","description":"This cordova plugin enables you to open a second webview","archived":false,"fork":false,"pushed_at":"2020-04-15T22:15:15.000Z","size":77,"stargazers_count":41,"open_issues_count":11,"forks_count":39,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-14T01:54:35.050Z","etag":null,"topics":["cordova","cordova-android","cordova-android-plugin","cordova-ios","cordova-ios-plugin","cordova-plugin","webview"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"metabase/metabase","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kunder-lab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-06T19:28:36.000Z","updated_at":"2025-03-28T23:32:53.000Z","dependencies_parsed_at":"2022-08-17T22:30:07.406Z","dependency_job_id":null,"html_url":"https://github.com/kunder-lab/cl.kunder.webview","commit_stats":null,"previous_names":["arturokunder/cl.kunder.webview"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fcl.kunder.webview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fcl.kunder.webview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fcl.kunder.webview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fcl.kunder.webview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kunder-lab","download_url":"https://codeload.github.com/kunder-lab/cl.kunder.webview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809032,"owners_count":21164895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cordova","cordova-android","cordova-android-plugin","cordova-ios","cordova-ios-plugin","cordova-plugin","webview"],"created_at":"2024-12-24T04:31:17.796Z","updated_at":"2025-04-14T01:54:40.711Z","avatar_url":"https://github.com/kunder-lab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!---\nlicense: Licensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n--\u003e\n\n# kunder-cordova-plugin-webview\nThis cordova plugin enables you to open a second webview in your app.\nThis webview is totally independent from the main webview, but allows you tu access plugins and other Cordova resources.\n\nIt's possible to modify this plugin to allow multiple webviews.\n\nReport issues on [github issue tracker](https://github.com/kunder-lab/cl.kunder.webview/issues)\n\n## Installation\n```\n    cordova plugin add https://github.com/kunder-lab/cl.kunder.webview.git\n```\n\n## Supported Platforms\n- Android\n- iOS\n\n\n## Quick Start\n\nTo open a new webview, just call in your app's js:\n```javascript\n    webview.Show(URL);\n```\n\nWhere `URL` is the path to the page to be opened. In Android, the plugin automatically adds the prefix `file:///android_asset/www/`\nBut only if no `*://` or `javascript:` is present at the front of the URL.\n\nThen, to close the second webview and return to the main view, call in your second webview (the opened webview, not the main webview):\n```javascript\n    webview.Close();\n```\n\nThis will close and destroy the second webview.\n\n# webView\n\nThe `webView`object provides a way to manage a second webview inside your cordova app. This could be usefull if you want to open a second page as a popup or you want to load new content that is totally unrelated to the main view, but still have the ability to use cordova plugins.\n\nThe main difference with inAppBrowser plugin is that cl.kunder.webview plugin can access and use all cordova plguins installed in your app.\n\n## Methods\n\n- __Show__: Opens a new webView \n- __Close__: Close and destroy the webView\n- __Hide__: Same as __Close__\n- __SubscribeCallback__: Suscribes a callback that is fired when webView is closed\n\n### Show\n__Parameters__:\n- __url__: The url to be opened. In Android, if the url does not contain a protocol prefix (`*://` or `javascript:*`), the prefix `file:///android_asset/www/` will be automatically added. _(String)_\n- __successCallback__: Is triggered when the plugin is succesfully called. _(Function)_\n- __errorCallback__: Is triggered when the plugin fails to be called or is called with error. _(Function)_\n- __loading__: Should show a loading dialog while webview is loading. _(Boolean optional)_\n\n### SubscribeCallback\nSuscribes a callback that is triggered when a webView is closed.\n\n__Parameters__:\n- __successCallback__: The callback that will be called when a webview is closed. It contains an array of parameteres given by the Close/Hide method called in the child webview. _(Function)_\n- __errorCallback__: Is triggered when the plugin fails to be called or is called with error. _(Function)_\n\n#### Usage\n```js\n// Main webview\n// This will be fired on second webview close\nwebview.SubscribeCallback(function(params) { console.log(params); }, function(){ console.log('error'); })\n``` \n\n### Close/Hide\n__Parameters__:\n- __successCallback__: Is triggered when the plugin is succesfully called. _(Function)_\n- __errorCallback__: Is triggered when the plugin fails to be called or is called with error. _(Function)_\n- __params__: Parameterers that want to be delivered to the parent webview through the SubscribeCallback method. _(Array)_\n\n### HideLoading\nClose the loading shown by Show method.\n\n__Parameters__:\n- __successCallback__: The callback that will be called when the loading is closed. _(Function optional)_\n- __errorCallback__: Is triggered when the plugin fails to be called or is called with error. _(Function optional)_\n\n### SubscribeExitCallback (Android only)\nSubscribes an exit callback that is triggered when ExitApp method is called.\n\n__Parameters__:\n- __successCallback__: The callback that will be called when a webview is closed. _(Function)_\n- __errorCallback__: Is triggered when the plugin fails to be called or is called with error. This can be empty function _(Function)_\n\n### ExitApp (Android)\nThis method execute the subscribed exit callback if exist. Then close the webview.\nThis method is usefull when onResume event is defined in your main app. You should set a flag in subscribeExitCallback success method. Then in onResume event you should verify the flag value. Finally the main app should call ionic.Platform.exitApp() method to close the app.\n\n### ExitApp (iOS)\nThis method execute objective-C exit(0) method.\n\n### SetWebViewBehavior (iOS)\nThis method adjust the size of the current webview using the iOS 11 status bar space. This method should be called at the beginning of the app.\nNo parameters required.\n\n## Other\n### Cordova Crypt File Plugin compatibility\nThis plugin is compatible with Cordova Crypt File Plugin. It will detect it automatically and will use decrypted assets files.\nFor more information about Crypt File Plugin, please visit the [plugin repo](https://github.com/tkyaji/cordova-plugin-crypt-file).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunder-lab%2Fcl.kunder.webview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkunder-lab%2Fcl.kunder.webview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunder-lab%2Fcl.kunder.webview/lists"}