Liming Xie created CB-7982: ------------------------------ Summary: Shield webView and loadUrl(), Make Cordova Plugin Reusable for other Frameworks Key: CB-7982 URL: https://issues.apache.org/jira/browse/CB-7982 Project: Apache Cordova Issue Type: New Feature Components: CordovaLib Affects Versions: Master Reporter: Liming Xie Fix For: Master
This idea "CordovaX" is to make hundreds of Cordova plugin reusable, not only in Cordova, but also for Unity3d, cocos2dx, etc. Cordova plugin manager is bridging function call between javascript and native languages, actually, it can be ported to bridge with C, C++, C#, then it can be reused for Unity, Cocos2d-X and other frameworks. To achieve the purpose, need make the interface between plugin and framework more common, the adapter interface below is usually enough for a plugin author: getActivity(), for Android / getViewController, for iOS getView() sendPluginResult() fireEvent(obj, eventName, jsonData), the obj can be window, document, cordova, etc. Some prototype based on current interface: https://github.com/floatinghotpot/cordova-plugin-ext If allow modify current implementation: 1. use cordova.getView(), instead of access webView directly. 2. call commandDelegate.fireEvent(), instead of call webView.loadUrl(). 3. hide ref to webView in CordovaPlugin. Plugin Manager for Unity3d/Cocos2dX can be implemented based on current Cordova framework by changing to corresponding adapter (cordova, commandDelegate) Discussed with Shazron, and decide to add a Jira tracker here. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org