Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLFormAction does not resolveurl in action getter. #1482

Closed
m4h3 opened this issue May 11, 2016 · 1 comment
Closed

HTMLFormAction does not resolveurl in action getter. #1482

m4h3 opened this issue May 11, 2016 · 1 comment

Comments

@m4h3
Copy link

m4h3 commented May 11, 2016

var t = window.document.createElement("form");
t.action = "foo"; /put a relative url or a path absolute url/
console.log(t.action)
(outputs foo)
In browsers (chrome and FF), action is resolved with baseURI, leading to http://whateverdomain/path/foo as output.

Looking at lib/jsdom/living/nodes/HTMLLinkElement-impl.js, i see

get href() {
    return resourceLoader.resolveResourceUrl(this._ownerDocument, this.getAttribute("href"));
}

I guess something is missing in jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js.

@m4h3
Copy link
Author

m4h3 commented May 16, 2016

Thanks Domenic

Le dim. 15 mai 2016 21:45, Domenic Denicola notifications@github.com a
écrit :

Closed #1482 #1482 via 499944e
499944e
.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1482 (comment)

nhunzaker pushed a commit to nhunzaker/jsdom that referenced this issue Dec 22, 2016
Now it resolves the URL correctly, and returns the document's URL if the attribute is absent or empty.

Closes jsdom#1482.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant