From 9420083a7b39782a7b34118b30c93aab9fec0e1e Mon Sep 17 00:00:00 2001 From: scottjehl Date: Sat, 11 Dec 2010 13:50:07 -0500 Subject: [PATCH] quick update to set the base.href back to the starting path, just in case, as some browsers may retain the base href after the element is removed from the DOM. Explained better here: https://github.com/phiggins42/has.js/commit/b2add677f00c548766c9600c058dabdacd32b4cc --- js/jquery.mobile.support.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index d3ecdcbe..ef9c0dd9 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -1,8 +1,8 @@ /* * jQuery Mobile Framework : support tests * Copyright (c) jQuery Project -* Dual licensed under the MIT or GPL Version 2 licenses. -* http://jquery.org/license +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* Note: Code is in draft form and is subject to change */ (function($, undefined ) { @@ -19,7 +19,7 @@ function propExists( prop ){ var uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1), props = (prop + ' ' + vendors.join(uc_prop + ' ') + uc_prop).split(' '); for(var v in props){ - if( fbCSS[ props[v] ] !== undefined ){ + if( fbCSS[ v ] !== undefined ){ return true; } } @@ -31,6 +31,7 @@ function baseTagTest(){ base = $("", {"href": fauxBase}).appendTo("head"), link = $( "" ).prependTo( fakeBody ), rebase = link[0].href; + base[0].href = location.pathname; base.remove(); return rebase.indexOf(fauxBase) === 0; };