projects
/
pwl6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid all 'arguments' mutation for Safari's sake.
[pwl6.git]
/
src
/
yuu
/
core.js
diff --git
a/src/yuu/core.js
b/src/yuu/core.js
index
22a1fb4
..
f4b40a2
100644
(file)
--- a/
src/yuu/core.js
+++ b/
src/yuu/core.js
@@
-7,7
+7,6
@@
(function (yuu) {
"use strict";
(function (yuu) {
"use strict";
-
yuu.require = function (m) {
try { return require(m); }
catch (exc) { return null; }
yuu.require = function (m) {
try { return require(m); }
catch (exc) { return null; }
@@
-93,10
+92,12
@@
wkdoc.dispatchEvent(ev);
});
win.on('new-win-policy', function (frame, url, policy) {
wkdoc.dispatchEvent(ev);
});
win.on('new-win-policy', function (frame, url, policy) {
- if (url.startsWith('chrome'))
+ if (url.startsWith('chrome'))
{
policy.forceNewPopup();
policy.forceNewPopup();
- else
- policy.forceDownload();
+ } else {
+ policy.ignore();
+ gui.Shell.openExternal(url);
+ }
});
}
});
}
@@
-154,7
+155,7
@@
req[k] = params[k];
req.onload = function () {
var status = this.status;
req[k] = params[k];
req.onload = function () {
var status = this.status;
- // status === 0 is given by
node-webkit
for success.
+ // status === 0 is given by
NW.js
for success.
if ((status >= 200 && status < 300) || status === 0)
resolve(this.response);
else
if ((status >= 200 && status < 300) || status === 0)
resolve(this.response);
else