The port.
*
This is inferred from the scheme if it isn't present in the Url itself.
If the scheme is not known and the port is not present, the port will be given as 0.
For some schemes, port will not be sensible -- for instance, file or chrome-extension.
If you explicitly need to detect whether the user provided a port, check the providedPort
field.
The port. * This is inferred from the scheme if it isn't present in the Url itself. If the scheme is not known and the port is not present, the port will be given as 0. For some schemes, port will not be sensible -- for instance, file or chrome-extension.
If you explicitly need to detect whether the user provided a port, check the providedPort field.