问题
My original script looks like this:
(function() {
// result = doSomeWorks()
return result;
})();
Which I can get a return value from APIs like chrome.tabs.executeScript
or execute_script
of selenium/webdriver.
But after the script being browserified (http://pastebin.com/7dBJuGzL), the return value seems just missed. I always get a null
value from the above APIs.
Is there any solution/workaround for this? Or maybe trying to get the return value from a browserified script it just not idiomatic to Browserify?
Thanks in advance.
来源:https://stackoverflow.com/questions/34540906/return-value-missed-within-the-closure-after-browserified