Add better location

pull/85/head
Ruben Daniels 2015-04-21 01:53:37 +00:00
rodzic 914cbd4e49
commit f2a2d76025
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -96,7 +96,7 @@ define(function(require, exports, module) {
function handle(err){
iframe.removeEventListener("load", handle);
iframe.removeEventListener("error", onError);
callback(err instanceof Error ? err : null);
callback(err instanceof Error ? err : null, tab);
}
function onError(e){
@ -122,9 +122,11 @@ define(function(require, exports, module) {
function run(pluginName, callback){
// Load test runner
loadIframe(pluginName, function(err){
loadIframe(pluginName, function(err, tab){
if (err) return callback(err);
tab.editor.setLocation("Test for `" + pluginName + "`")
// Wait until iframe is loaded
plugin.once("ready", function(){