Update chrome.js

This commit is contained in:
Namhyeon Go 2021-11-18 14:25:17 +09:00 committed by GitHub
parent e8e08c5a2d
commit d084be3598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -325,6 +325,21 @@ var ChromeObject = function() {
}, []);
};
this.getParameterValue = function(paramName) {
var paramValue;
var page = this.getPageById(this.pageId);
var params = page.url.split('&');
for (var i = 0; i < params.length; i++) {
if (params[i].indexOf(paramName + '=') == 0) {
paramValue = params[i].substring((paramName + '=').length);
//break; // Do not break because will be get the last value
}
}
return paramValue;
};
this.sendPageRPC = function(method, params) {
var result = null;