Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

e4x investigation

#145

Oooh took me a while to figure this out. I added the comment.

from src/dom/domparser.js

DOMParser = function(principle, documentURI, baseURI){};
__extend__(DOMParser.prototype,{
    parseFromString: function(xmlstring, mimetype){
        var doc = new Document(new DOMImplementation()),
            e4;

        // TODO: JAVA ALERT -- 'XML' is a global object                                              
        //  not sure if this is envjs-special? or a normal java thing                                
        // if (XML) {  ????                                                                          
        XML.ignoreComments = false;
        XML.ignoreProcessingInstructions = false;
        XML.ignoreWhitespace = false;

        xmlstring = xmlstring.replace(/<\?xml.*\?>/);

        e4 = new XMLList(xmlstring);

        __toDomNode__(e4, doc, doc);

        //console.log('xml \n %s', doc.documentElement.xml);                                         
        return doc;

    }
});

whaddya think...

Reported by nickg · March 31st, 2010 @ 04:26 PM

State: resolved
Milestone: none
Assigned to: nickg nickg

Activity

  1. Thatcher
    Thatcher

    Nick, XML and XMLNode are the interfaces exposed by the E4X.

    March 31st, 2010 @ 04:38 PM

  2. nickg
    nickg
    • State changed from new to open
    • Assigned user changed from Thatcher to nickg
    • Title changed from secret embedded java in dom/domparser.js to e4x investigation

    hahah

    Yah I just figured it out.

    For some reason spidnermonkey isn't doing the right thing with it....

    April 2nd, 2010 @ 12:19 PM

  3. nickg
    nickg

    add rules to JSLint to ignore XML, XMLList.

    April 2nd, 2010 @ 12:50 PM

  4. nickg
    nickg
    • State changed from open to resolved

    Rhino:

    attributenode.text() == attributenode.valueOf() == the value

    Spidermonkey

    attr.text() == ""
    attr.valueOf == the value

    Who knows what is correct but I changed the attribute processing code to use valueOf which works in both.

    Added a ton of notes as well.

    Resolving.

    April 11th, 2010 @ 01:43 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.