Opened 9 years ago
Closed 9 years ago
#16639 closed Task (fixed)
Make callback parameter in ajax.post optional
| Reported by: | Marek Lewandowski | Owned by: | Marek Lewandowski |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.6.1 |
| Component: | General | Version: | |
| Keywords: | Cc: |
Description
While building JsDuck produces following warning:
Warning: /path/to/dev/ckeditor-dev/plugins/ajax/plugin.js:137: Optional param followed by regular param callback
We need to make callback parameter also optional, it's enough to modify plugin's internal post method, and just conditionally call callback.
Change History (8)
comment:1 Changed 9 years ago by
| Status: | new → confirmed |
|---|
comment:2 Changed 9 years ago by
| Summary: | Fix ajax.post docs → Make callback parameter in ajax.post optional |
|---|
comment:3 Changed 9 years ago by
| Owner: | set to Marek Lewandowski |
|---|---|
| Status: | confirmed → assigned |
comment:4 Changed 9 years ago by
| Status: | assigned → review |
|---|
comment:5 Changed 9 years ago by
| Status: | review → review_failed |
|---|
The solution is fine. However, there is one, very small issue. The added manual test says:
Expected: No JavaScript exceptions are logged into the console.
There is one exception logged every time you click send POST request:
plugin.js:112 POST http://tests.ckeditor.dev:1030/tests/plugins/ajax/manual/post404.html 404 (Not Found)
I know it is not connected with the fix and probably was done on purpose (post404.html suggests it), but I think it might be quite confusing in this particular case.
comment:6 Changed 9 years ago by
| Status: | review_failed → review |
|---|
I've tried to use existing resource for POST requests, but Bender doesn't handle POST at all - thus changing Bender behavior for this little ticket will be too time consuming. But I have updated the manual test description to mention that 404 error will be reported.
Pushed to the same branch.
comment:8 Changed 9 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Merged to master with 79201bd.

Pushed to branch:t/16639.