1 /*
  2  * Copyright ©2012 SARA bv, The Netherlands
  3  *
  4  * This file is part of js-webdav-client.
  5  *
  6  * js-webdav-client is free software: you can redistribute it and/or modify
  7  * it under the terms of the GNU Lesser General Public License as published
  8  * by the Free Software Foundation, either version 3 of the License, or
  9  * (at your option) any later version.
 10  *
 11  * js-webdav-client is distributed in the hope that it will be useful,
 12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14  * GNU Lesser General Public License for more details.
 15  *
 16  * You should have received a copy of the GNU Lesser General Public License
 17  * along with js-webdav-client.  If not, see <http://www.gnu.org/licenses/>.
 18  */
 19 "use strict";
 20 
 21 // If nl.sara.webdav.Ie is already defined, we have a namespace clash!
 22 if (nl.sara.webdav.Ie !== undefined) {
 23   throw 'Class name nl.sara.webdav.Ie already taken, could not load JavaScript library for WebDAV connectivity.';
 24 }
 25 
 26 /**
 27  * @class This class holds all IE hacks
 28  */
 29 nl.sara.webdav.Ie = {};
 30 
 31 /**
 32  * Although this library has no intent to work in IE older than versions 9, it should work in IE and sometimes requires some special attention for this wonderful browser
 33  *
 34  * @var  Boolean  True if the current browser is IE
 35  */
 36 nl.sara.webdav.Ie.isIE = false;
 37 /*@cc_on
 38 nl.sara.webdav.Ie.isIE = true;
 39 @*/
 40 
 41 //########################## DEFINE PUBLIC METHODS #############################
 42 /**
 43  * Returns the localName of a DOM Node object
 44  *
 45  * @param    {Node}    node  The node to determine the localname for
 46  * @returns  {String}        The local name
 47  */
 48 nl.sara.webdav.Ie.getLocalName = function(node) {
 49   if (nl.sara.webdav.Ie.isIE && node.baseName) {
 50     return node.baseName;
 51   }else{
 52     return node.localName;
 53   }
 54 };
 55 
 56 // End of library
 57