{"action":"created","issue":{"url":"https://api.github.com/repos/crosswalk-project/cordova-plugin-crosswalk-webview/issues/35","labels_url":"https://api.github.com/repos/crosswalk-project/cordova-plugin-crosswalk-webview/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/crosswalk-project/cordova-plugin-crosswalk-webview/issues/35/comments","events_url":"https://api.github.com/repos/crosswalk-project/cordova-plugin-crosswalk-webview/issues/35/events","html_url":"https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/pull/35","id":93592282,"number":35,"title":"Enable CLI configuration of Version and Commandline switches via plugin hooks","user":{"login":"SidneyS","id":1630917,"avatar_url":"https://avatars.githubusercontent.com/u/1630917?v=3","gravatar_id":"","url":"https://api.github.com/users/SidneyS","html_url":"https://github.com/SidneyS","followers_url":"https://api.github.com/users/SidneyS/followers","following_url":"https://api.github.com/users/SidneyS/following{/other_user}","gists_url":"https://api.github.com/users/SidneyS/gists{/gist_id}","starred_url":"https://api.github.com/users/SidneyS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SidneyS/subscriptions","organizations_url":"https://api.github.com/users/SidneyS/orgs","repos_url":"https://api.github.com/users/SidneyS/repos","events_url":"https://api.github.com/users/SidneyS/events{/privacy}","received_events_url":"https://api.github.com/users/SidneyS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-07T18:05:36Z","updated_at":"2015-07-21T07:48:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/crosswalk-project/cordova-plugin-crosswalk-webview/pulls/35","html_url":"https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/pull/35","diff_url":"https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/pull/35.diff","patch_url":"https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/pull/35.patch"},"body":"Hi,\r\n\r\nI came up with a practical - as in, plugin-agnostic and hopefully timesaving -  polyfill for an upcoming feaure in cordova-lib, which lets us specify plugin preference defaults and enables supplying CLI variables with hard-requiring them (see https://issues.apache.org/jira/browse/CB-9162).\r\n\r\nMotivation? The programmatic setup of Crosswalk plugin is often required by 3rd party CLIs or other tools, which defer to or embed cordova. (e.g., Ionic via \"ionic browser add\").\r\n\r\nNeed XWalk 15 for a new project and want to test experimental Chromium features? Try:\r\n```bash\r\ncordova plugin add cordova-plugin-crosswalk-webview --variable CROSSWALK_ANDROID_VERSION=\"15\" --variable CROSSWALK_ANDROID_COMMANDLINE=\"--enable-usermedia-screen-capturing\"\r\n```\r\nOf course, all present configuration vectors remain active. The hook simply gets its defaults by parsing plugin.xml, and creates configuration elements in config.xml (which are in turn parsed by platforms). Full JSDoc documentation inside.\r\n\r\nAlso did some very minor cleanup. Looking forward to your input.\r\n\r\nSincerely,\r\nS"},"comment":{"url":"https://api.github.com/repos/crosswalk-project/cordova-plugin-crosswalk-webview/issues/comments/123203099","html_url":"https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/pull/35#issuecomment-123203099","issue_url":"https://api.github.com/repos/crosswalk-project/cordova-plugin-crosswalk-webview/issues/35","id":123203099,"user":{"login":"huningxin","id":1005673,"avatar_url":"https://avatars.githubusercontent.com/u/1005673?v=3","gravatar_id":"","url":"https://api.github.com/users/huningxin","html_url":"https://github.com/huningxin","followers_url":"https://api.github.com/users/huningxin/followers","following_url":"https://api.github.com/users/huningxin/following{/other_user}","gists_url":"https://api.github.com/users/huningxin/gists{/gist_id}","starred_url":"https://api.github.com/users/huningxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huningxin/subscriptions","organizations_url":"https://api.github.com/users/huningxin/orgs","repos_url":"https://api.github.com/users/huningxin/repos","events_url":"https://api.github.com/users/huningxin/events{/privacy}","received_events_url":"https://api.github.com/users/huningxin/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T07:48:55Z","updated_at":"2015-07-21T07:48:55Z","body":"LGTM. Thanks!"}}