message: Updated helper fetch dom to support post
diff: * @param {string} url
  * @returns {Document} dom element
  */
  -export default function fetchDom (url) {
  +export default function fetchDom (url, options) {
  + if (typeof url !== 'string') {
  + throw new TypeError('argument 1 has to be string')
  + }
  +
  + if (options && /^post$/i.test(options.method)) {
  + return postHandler(url, options.body)
  + }
  +
  + return getHandler(url)
  +}
  +
  +function getHandler (url) {
  return new Promise((resolve, reject) => {
  let xhr = new XMLHttpRequest()
  xhr.onload = function () {
  @@ -19,3 +31,21 @@ export default function fetchDom (url) {
  xhr.send()
  })
  }
  +
  +function postHandler (url, body) {
  + return new Promise((resolve, reject) => {
  + let xhr = new XMLHttpRequest()
  + xhr.onload = function () {
  + if (xhr.status !== 200) {
  + return reject('Response code ' + xhr.status)
  + }
  + resolve(xhr.responseXML)
  + }
  + xhr.onerror = function (e) {
  + reject(e.toString())
  + }
  + xhr.open('POST', url)
  + xhr.responseType = 'document'
  + body ? xhr.send(body) : xhr.send()
  + })
  +}
  