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.

For some reason window.location is working but document location is not

#121

These things should exist:

document.location.hash,
document.location.host,
document.location.hostname,
document.location.href,
document.location.pathname,
document.location.port,
document.location.protocol,
document.location.search,
document.location.assign,
document.location.reload,
document.location.replace.

Example page could be found at http://client.maxbet.asia/envjs.php

Reported by d0rc · March 19th, 2010 @ 12:53 PM

State: open
Milestone: none
Assigned to: nickg nickg

Activity

  1. d0rc
    d0rc
    • Assigned user set to Thatcher

    March 21st, 2010 @ 05:08 AM

  2. nickg
    nickg
    • Tag set to location
    • State changed from new to open
    • Assigned user changed from Thatcher to nickg

    hi,

    please pull the latest changes and see if it solves your issues.

    thanks,

    --nickg

    March 24th, 2010 @ 06:42 PM

  3. nickg
    nickg

    Uh oh:

    src/html/document.js

    get location() {

        if (this.ownerWindow) {
            return this.ownerWindow.location;
        } else {
            return this.baseURI;
        }
    },
    set location(url) {
        this.baseURI = url;
        if (this.ownerWindow) {
            this.ownerWindow.location = url;
        }
    },
    
    
    
    

    overwritten with:

    src/xhr/document.js

        get location(){

    return new Location(this.documentURI, this);
    },
    set location(url){
    //very important or you will go into an infinite                                                                            
    //loop when creating a xml document                                                                                         
    if(url) {
            this.location.replace(url);
    }
    }</code>
    
    
    
    

    need investigation

    March 30th, 2010 @ 03:02 AM

  4. nickg
    nickg

    I still see this occasionally. Not sure how location is not getting set.

    I'm working on it.

    April 8th, 2010 @ 03:22 PM

  5. nickg
    nickg

    a few fixes are in for this problem, but it's still not completely correct.

    Right now, each "module directory" (e.g dom, parser, css, html, etc) has it's own tests and each module loads in just what it needs to run the test.

    I have an alteranate test harness that loads in all of env.(rhino).js and runs the tests that way.

    one-at-a-time: all tests pass
    env.js + test: document.location test is failing!

    we are getting closer...

    --nickg

    April 11th, 2010 @ 10:51 AM

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.