happy-dom
happy-dom copied to clipboard
URL Parse Error
test code
window.location.href = "//www.google.com";
Return
Location {
protocol: '',
hostname: '',
port: '',
pathname: '//www.google.com',
search: '',
hash: '',
username: '',
password: ''
}
reference link: https://github.com/jsdom/whatwg-url https://url.spec.whatwg.org/#concept-url-parser
It's hard...
known issues:
- serialize URL not impl example code:
const html = `<html>
<img alt="" name="image" src="//www.google.com"/>
</html>`;
document.write(html);
console.log(document.getElementsByName('image')[0].src);
// "//www.google.com"