Per: whatwg/url#97
Given the test case:
var m = new url.URL('file:///example/foo');
m.host = 'example.net:81';
The resulting URL is:
URL {
href: file://example.net:81/example/foo
protocol: file:
hostname: example.net
port: 81
pathname: /example/foo
}
The host setter needs to take into consideration the fact that this is a file URL. PR incoming shortly.