Currently the new whatwg url class doesn't seem to work with any other scheme except so called 'special schemes' in the spec:
https://url.spec.whatwg.org/
E.g. this works:
const{URL}=require('url');consturl=newURL('http://foo.bar');url.protocol='ftp';url.toString();// => ftp://foo.barBut this doesn't work:
const{URL}=require('url');consturl=newURL('http://foo.bar');url.protocol='s3';url.toString();// http://foo.bar => should be s3://foo.barEven schemes defined here: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml don't work.
Not that this does work:
const{URL}=require('url');consturl=newURL('s3://foo.bar');url.protocol;// = s3:
Currently the new whatwg url class doesn't seem to work with any other scheme except so called 'special schemes' in the spec:
https://url.spec.whatwg.org/
E.g. this works:
But this doesn't work:
Even schemes defined here: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml don't work.
Not that this does work: