
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
@dotdev/ajax-queue
Advanced tools
const queue = new Q([config]);
queue.add([request]);
config
- objectThe config object is not required
Name | Description | Type | Default |
---|---|---|---|
success | The callback for all successful ajax requests processed by this queue | function | Dispatch a Q:requestCompleted event |
error | The callback for all unsuccessful ajax requests processed by this queue | function | Dispatch a Q:requestFailed event |
completedAllRequestsEvent | The event type that will be dispatched once all requests have finished | string | Q:requestsCompleted |
completedRequestEvent | The event type that will be dispatched after each request is finished | string | Q:requestCompleted |
failedRequestEvent | The event type that will be dispatched after a request has failed | string | Q:requestFailed |
requestStartedEvent | The event type that will be dispatched after each request has started | string | Q:requestStarted |
errorEvent | The event type that will be dispatched after Q has thrown an error | string | Q:error |
add
Adds a request to the currently running queue, this will cause the queue to process each item, one at a time until all requests have been resolved.
const queue = new Q()
// Build the ajax request
const request = {
url: '/cart/add.js',
data: item,
success: options.success,
error: options.error
}
// Add the request to the ajax request queue
this.queue.add(request)
})
request
- objectName | Description | Required | Type | Default |
---|---|---|---|---|
success | The callback for a successful response, overwrites the queue default. | false | function | Dispatch a Q:requestCompleted event |
error | The callback for an unsuccessful response, overwrites the queue default. | false | function | Dispatch a Q:requestFailed event |
url | The url that the request will be sent to | true | string | null |
method | The method that will be used to make the request | false | string | GET |
data | Any data that you wish to send to the request | false | any | null |
dataType* | The type of data that we expect to recieve from the request | false | string | '' |
Options:
''
, 'arraybuffer'
, 'blob'
, 'document'
, 'json'
, 'text'
FAQs
Front end ajax queue and request handler
We found that @dotdev/ajax-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.