Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failコールバックへnullなど関数でないものを渡した時に、commonFailHandlerが動作しない #205

Closed
fukudayasuo opened this issue May 16, 2013 · 1 comment
Assignees
Labels
bug
Milestone

Comments

@fukudayasuo
Copy link

@fukudayasuo fukudayasuo commented May 16, 2013

// commonFailHandlerの設定
h5.settings.commonFailHandler = function(){console.log('cm')};
d=h5.async.deferred();
d.fail(null);
d.reject(); // commonFailHandlerが動作しない

関数でない、nullなど無効な引数を登録したときはfailコールバックが登録されたと見做さずに、commonFailHandlerを呼ぶようにする。

また、コールバックは配列でも指定できる。配列中に関数がなくてfailコールバックが登録されなかった場合もcommonFailHandlerは動作させる。

// failは以下のように引数を取って関数を登録できる
d.fail(func);
d.fail([func1, func2]);
d.fail(func1, func2); // 可変長でも指定可能
@ghost ghost assigned fukudayasuo May 17, 2013
fukudayasuo pushed a commit to hifive-labs/hifivemain that referenced this issue May 17, 2013
@fukudayasuo
Copy link
Author

@fukudayasuo fukudayasuo commented May 20, 2013

fa9d6e6 テストケース追加しました

@simdy simdy closed this May 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.