hubik-platform-chrome
Advanced tools
Comparing version 0.0.2 to 0.0.3
37
index.js
@@ -75,4 +75,4 @@ var Platform = require("hubik-platform"), | ||
}).then(function(res){ | ||
params.callback(res.result); | ||
}); | ||
params.callback(res.result); | ||
}); | ||
}); | ||
@@ -97,9 +97,20 @@ | ||
}); | ||
$instance.addInterface("@Navigation&Automation.$runtime.timeline",function(callback){ | ||
var timelineProtocol = protocol.timeline(callback); | ||
$instance.addInterface("@Navigation&Automation.$runtime.timeline",function(){ | ||
var endCallback; | ||
var endData = []; | ||
var timelineProtocol = protocol.timeline(function(data){ | ||
if(data.complete && !!endCallback){ | ||
endCallback(endData) | ||
} | ||
else{ | ||
endData.push(data.data) | ||
} | ||
}); | ||
return { | ||
start: function(){ | ||
endData = []; | ||
timelineProtocol.start(); | ||
}, | ||
end: function(){ | ||
end: function(callback){ | ||
endCallback = callback | ||
timelineProtocol.end(true); | ||
@@ -111,11 +122,11 @@ } | ||
return protocol.send( | ||
{ | ||
"command": "Runtime.evaluate", | ||
"params":{ | ||
"expression": code | ||
} | ||
}).then(function(res){ | ||
callback(res.result); | ||
}); | ||
{ | ||
"command": "Runtime.evaluate", | ||
"params":{ | ||
"expression": code | ||
} | ||
}).then(function(res){ | ||
callback(res.result); | ||
}); | ||
}); | ||
}); |
{ | ||
"name": "hubik-platform-chrome", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "The chrome platform logic of Hubik.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11850
336