| Issue 240: | bug 以下这些代码难道会执行吗?( It will do ? what ?) | |
| 2 people starred this issue and may be notified of changes. | Back to list |
|
function fileType() {
if (currentSettings.forceType) {
.......
return tmp;
}
...........
if (from && from.nodeName) {
if (imgType)
return imgType;
.......
.......
if (from.nodeName.toLowerCase() == 'form') {
...........
return 'form';
}
if (iframe)
return 'iframe';
}else {
.....................
if (!url)
return null;
.........
if (url.match(reg1))
return 'iframe';
}
----------------------------
| ???? ????????
| 以下这些代码难道会执行吗?(It will do ? what ?)
----------------------------
var imgType = imageType(url, from);
if (imgType)
return imgType;
var swf = new RegExp('[^\.]\.(swf)\s*$', 'i');
if (swf.test(url))
return 'swf';
var tmp = extractUrlSel(url);
setCurrentSettings(tmp);
if (!tmp.url)
return tmp.selector;
}
May 13, 2009
I don't understand what you're asking? if it's about the code after the big if/else block, it will be running in some cases.
May 14, 2009
after the big if/else block, when 'if' has 'return' and 'else' has 'return' too, How cases can will be running in 'nyromodal Plugin'? is blocker ? thank you!
May 14, 2009
for exemple, you're in the else block. the url is not null and doesn't match with the regExp => 1 case basically, this code will be executed for every ajax load.
Status:
Fixed
May 14, 2009
sorry,I see.
if (!currentSettings.content)
currentSettings.from = true;
the code not return;
Thank you very much for the help,I like nyromodal plugin,and you
|
||||||||
Sorry, I very poor English. function test() { if(1){ return '1'; }else{ return '2'; } alert('Can the implementation of these codes '); }