From ac2885afc6a5aaf3f62041d6cf5e8ed21d461f3e Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Wed, 3 Feb 2010 14:20:06 -0800 Subject: [PATCH] Support base tag again. Reviewed by me. --- Objective-J/StaticResourceNode.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Objective-J/StaticResourceNode.js b/Objective-J/StaticResourceNode.js index 0f4c7fb33..66c42f078 100644 --- a/Objective-J/StaticResourceNode.js +++ b/Objective-J/StaticResourceNode.js @@ -31,7 +31,7 @@ require("file"); cwd: function() { - return FILE.dirname(window.location.pathname); + return FILE._cwd; }, normal: function(/*String*/ aPath) @@ -101,6 +101,14 @@ require("file"); return FILE.normal(aPath).split("/"); } } + +var DOMBaseElement = document.getElementsByTagName("base")[0]; + +if (DOMBaseElement) + FILE._cwd = FILE.dirname(DOMBaseElement.getAttribute("href")); +else + FILE._cwd = FILE.dirname(window.location.pathname); + #endif StaticResourceNode.FileType = 0;