Copyright (c) 2017, Philip Walton philip@philipwalton.com
provide an object as the in-memory cache
Gets the closest parent element that matches the passed selector.
The element whose parents to check.
The CSS selector to match against.
True if the selector should test against the passed element itself.
The matching element or undefined.
Delegates the handling of events for an element matching a selector to an ancestor of the matching element.
The ancestor element to add the listener to.
The event type to listen to.
A CSS selector to match against child elements.
A function to run any time the event happens.
A configuration options object. The available options:
- useCapture<boolean>: If true, bind to the event capture phase.
- deep<boolean>: If true, delegate into shadow trees.
The delegate object. It contains a destroy method.
Dispatches an event on the passed element.
The DOM element to dispatch the event on.
The type of event to dispatch.
The return value of element.dispatchEvent
, which will
be false if any of the event listeners called preventDefault
.
Gets all attributes of an element as a plain JavaScriot object.
The element whose attributes to get.
An object whose keys are the attribute keys and whose values are the attribute values. If no attributes exist, an empty object is returned.
return the byte size of the string
get current time
check if passed value is an integer
Tests if a DOM elements matches any of the test DOM elements or selectors.
The DOM element to test.
A DOM element, a CSS selector, or an array of DOM elements or CSS selectors to match against.
True of any part of the test matches.
Tests whether a DOM element matches a selector. This polyfills the native Element.prototype.matches method across browsers.
The DOM element to test.
The CSS selector to test element against.
True if the selector matches.
Returns an array of a DOM element's parent elements.
An array of all parent elemets, or an empty array if no parent elements are found.
Parses the given url and returns an object mimicing a Location
object.
An object with the same properties as a Location
.
Sign a HTTP request, add 'Authorization' header to request param
HTTP request object
request: { method: GET | POST | PUT ... url: ..., headers: { header1: ... }, data: data }
AWS access credential info
access_info: { access_key: ..., secret_key: ..., session_token: ... }
Signed HTTP request
List of header keys included in the canonical headers.
Default cache config
Copyright (c) 2017, Philip Walton philip@philipwalton.com