function isDOMParserAvailable() {
      try {
        return !!getInertBodyElement_DOMParser('');
      } catch (e) {
        return false;
      }
    }
Create an inert document that contains the dirty HTML that needs sanitizing.
We use the DOMParser API by default and fall back to createHTMLDocument if DOMParser is not
available.