Last active
November 17, 2018 08:36
-
-
Save kitsuyui/0fd7a9c128b44758d10db5cdfc14533d to your computer and use it in GitHub Desktop.
トリビア: location.port = undefined すると port が 0 になるのなんでだろう ref: https://qiita.com/kitsuyui/items/0625a1eed6ceb36bbf63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (IsASCIIDigit(value[port_end]) && port_end < length) | |
++port_end; | |
while (value[port_start] == '0' && port_start < port_end - 1) | |
++port_start; | |
// Required for backwards compat. | |
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=23463 | |
if (port_start == port_end) | |
return "0"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment