summaryrefslogtreecommitdiff
path: root/webhelper
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-09-06 09:25:05 -0700
committerPhilip Chimento <philip@endlessm.com>2013-09-16 10:30:42 -0700
commit6d595d347c6d454edc4749333edd413e9640a99d (patch)
tree1476d8aaafb559d7aaa0f337da7c3231e72e75a6 /webhelper
parent02f3b14035f0b7f97f24c6bb2f8e81ee1884bc0c (diff)
Adjust API so that "public" functions don't start with _
Also, since the functions will likely be translated into C in the future, give_them_underscored_names insteadOfCamelCase, in order to avoid API changes. [endlessm/eos-sdk#290]
Diffstat (limited to 'webhelper')
-rw-r--r--webhelper/webhelper.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/webhelper/webhelper.js b/webhelper/webhelper.js
index 8b78931..8286d9f 100644
--- a/webhelper/webhelper.js
+++ b/webhelper/webhelper.js
@@ -16,13 +16,11 @@ const Application = new Lang.Class({
_webActions: { },
-// This callback does the translation from URI to action
-// this._webview.connect('navigation-policy-decision-requested',
-// Lang.bind(this, this._webHelper.onNavigationRequested));
+ // This callback does the translation from URI to action
+ // webview.connect('navigation-policy-decision-requested',
+ // Lang.bind(this, this.web_actions_handler));
- _onNavigationRequested : function(web_view, frame, request,
- navigation_action, policy_decision,
- user_data) {
+ web_actions_handler: function(webview, frame, request, action, policy_decision) {
let uri = request.get_uri();
if(uri.indexOf(EOS_URI_SCHEME) == 0) {
@@ -69,7 +67,7 @@ const Application = new Lang.Class({
return dom.get_element_by_id(id);
},
- _translateHTML: function(webview, lang) {
+ translate_html: function(webview) {
let dom = webview.get_dom_document();
// WebKit.DOMNodeList