Port IE bugfix to latest (was 0.6.3)

This commit is contained in:
Kegan Myers 2014-04-17 23:34:22 -05:00
parent b84f10b88f
commit 0a0645518c
7 changed files with 13 additions and 5 deletions

View file

@ -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>"

View file

@ -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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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))
}

View file

@ -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",