Port IE bugfix to latest (was 0.6.3)
This commit is contained in:
parent
b84f10b88f
commit
0a0645518c
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Typertext",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"homepage": "https://github.com/terribleplan/Typertext",
|
||||
"authors": [
|
||||
"Kegan Myers <kegan@keganmyers.com>"
|
||||
|
|
|
@ -206,6 +206,9 @@ var Typertext;
|
|||
HttpUrl.FromUrl = function (location) {
|
||||
var l = document.createElement("a");
|
||||
l.href = location;
|
||||
if (!l.hostname || !l.protocol || !l.pathname || !l.search || !l.port) {
|
||||
l.href = l.href;
|
||||
}
|
||||
return new HttpUrl(l.hostname, Typertext.Http.HttpProtocol[l.protocol.slice(0, -1)], l.pathname, HttpUrl.DecodeQueryString(l.search), parseInt(l.port));
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
2
build/typertext.min.js
vendored
2
build/typertext.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -35,6 +35,11 @@ module Typertext.Http {
|
|||
public static FromUrl(location:string):HttpUrl {
|
||||
var l = document.createElement("a");
|
||||
l.href = location;
|
||||
if (!l.hostname || !l.protocol || !l.pathname || !l.search || !l.port) {
|
||||
//This may seem silly, but it is serious business for IE and relative URLs
|
||||
//noinspection SillyAssignmentJS
|
||||
l.href = l.href;
|
||||
}
|
||||
return new HttpUrl(l.hostname, HttpProtocol[l.protocol.slice(0,-1)], l.pathname, HttpUrl.DecodeQueryString(l.search), parseInt(l.port))
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"type": "git",
|
||||
"url": "https://github.com/terribleplan/Typertext.git"
|
||||
},
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.2",
|
||||
"grunt-cli": "~0.1.13",
|
||||
|
|
Reference in a new issue