Skip to content

Instantly share code, notes, and snippets.

@kitsuyui
Last active November 17, 2018 08:36
Show Gist options
  • Save kitsuyui/0fd7a9c128b44758d10db5cdfc14533d to your computer and use it in GitHub Desktop.
Save kitsuyui/0fd7a9c128b44758d10db5cdfc14533d to your computer and use it in GitHub Desktop.
トリビア: location.port = undefined すると port が 0 になるのなんでだろう ref: https://qiita.com/kitsuyui/items/0625a1eed6ceb36bbf63
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