Module: fetchdom

Fetch an XML resource and make a Document out of it.
Version:
  • M2022-08-06
Author:
  • Louis A. de Fouquières https://github.com/Louis-Aime
License:
  • MIT 2016-2022
Source:

Methods

(static) fetchDOM(XMLResource, timeout) → {Promise}

This function works the same as import (), but the imported XML resource is a document object in the sense of DOM.
Parameters:
Name Type Description
XMLResource String the URL of the fetched resource.
timeout Number the timeout passed to XMLHttpRequest in ms; default is 0, meaning no timeout.
Source:
Returns:
The parameter of the resolution function is the document corresponding to the fetched resource, the parameter of the failure function is the error message.
Type
Promise