Use nsIParserUtils or equivalent in WebExtensions?

Is there a way to use nsiParserUtils in webExtensions? If not then is there an equivalent utility lib/method from Mozilla that we can use in webExtensions?

nsiParserUtils methods: parseFragment, sanitize

nsiParserUtils

Let me know if there is any other straight forward strategy (reviewers approved) available to sanitize an HTML string and create a DOM node.