Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7577055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:05:17+00:00 2026-05-30T17:05:17+00:00

here’s come the snippet : html = <!doctype html>; html += <html>; html +=

  • 0

here’s come the snippet :

html  = "<!doctype html>";
html += "<html>";
html += "<head><title>test</title></head>";
html += "<body><p>test</p></body>";
html += "</html>";

parser = new DOMParser();

dom = parser.parseFromString (html, "text/html");

here’s come the error when trying to execute these lines :

Error: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMParser.parseFromString]

I try to figure out what’s going on but the code seems to be right and I searched on the web, i come here with no clues.

have you encounter this failure before ? if yes, where’s the bug hiding ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:05:18+00:00Added an answer on May 30, 2026 at 5:05 pm

    You should use DomParser function described at JavaScript DOMParser access innerHTML and other properties

    I created fiddle for you http://jsfiddle.net/CSAnZ/

    /* 
     * DOMParser HTML extension 
     * 2012-02-02 
     * 
     * By Eli Grey, http://eligrey.com 
     * Public domain. 
     * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. 
     */  
    
    /*! @source https://gist.github.com/1129031 */  
    /*global document, DOMParser*/  
    
    (function(DOMParser) {  
        "use strict";  
        var DOMParser_proto = DOMParser.prototype  
          , real_parseFromString = DOMParser_proto.parseFromString;
    
        // Firefox/Opera/IE throw errors on unsupported types  
        try {  
            // WebKit returns null on unsupported types  
            if ((new DOMParser).parseFromString("", "text/html")) {  
                // text/html parsing is natively supported  
                return;  
            }  
        } catch (ex) {}  
    
        DOMParser_proto.parseFromString = function(markup, type) {  
            if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {  
                var doc = document.implementation.createHTMLDocument("")
                  , doc_elt = doc.documentElement
                  , first_elt;
    
                doc_elt.innerHTML = markup;
                first_elt = doc_elt.firstElementChild;
    
                if (doc_elt.childElementCount === 1
                    && first_elt.localName.toLowerCase() === "html") {  
                    doc.replaceChild(first_elt, doc_elt);  
                }  
    
                return doc;  
            } else {  
                return real_parseFromString.apply(this, arguments);  
            }  
        };  
    }(DOMParser));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is an example: I write html code inside of textarea, then I swap
Here's my test function (c#, visual studio 2010): [TestMethod()] public void TestGetRelevantWeeks() { List<sbyte>
Here is a snippet of my xaml: <ComboBox x:Name=cbo1 Width=100 SelectedValue=200> <ComboBoxItem Name=n1>100</ComboBoxItem> <ComboBoxItem
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Here is a simple demonstration of what I'm talking about js in head tag:
Here's my proposed (very simplified to illustrate the problem space) design for a C#
Here the total height of all <div> 's are 900 pixels, but the jQuery
Here is a complete example. I want to forbid using A::set from objects casted
Here's the deal: I'm in the process of planning a mid-sized business application that
Here's what I want to do: Given a table PeopleOutfit (id int primary key,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.