[kupu-checkins] r40433 - kupu/trunk/kupu/common
Manos Batsis
manos_lists at geekologue.com
Tue Mar 13 14:51:33 CET 2007
Maybe the sarissa CVS head works for you?
duncan at codespeak.net wrote:
> Author: duncan
> Date: Tue Mar 13 12:37:56 2007
> New Revision: 40433
>
> Modified:
> kupu/trunk/kupu/common/sarissa.js
> Log:
> importNode for IE couldn't handle TBODY nodes
>
> Modified: kupu/trunk/kupu/common/sarissa.js
> ==============================================================================
> --- kupu/trunk/kupu/common/sarissa.js (original)
> +++ kupu/trunk/kupu/common/sarissa.js Tue Mar 13 12:37:56 2007
> @@ -431,15 +431,17 @@
> */
> document.importNode = function(oNode, bChildren){
> if (oNode.nodeName=='#text') {
> - return document.createTextElement(oNode.data);
> + return document.createTextNode(oNode.data);
> }
> - var tmp = document.createElement("div");
> + var tmp = document.createElement("div");
> +
> + var pNode = (oNode.nodeName.toLowerCase()=='tbody')? oNode.parentNode: oNode;
> if(bChildren){
> - tmp.innerHTML = oNode.xml ? oNode.xml : oNode.outerHTML;
> + tmp.innerHTML = pNode.xml ? pNode.xml : pNode.outerHTML;
> }else{
> - tmp.innerHTML = oNode.xml ? oNode.cloneNode(false).xml : oNode.cloneNode(false).outerHTML;
> + tmp.innerHTML = pNode.xml ? pNode.cloneNode(false).xml : pNode.cloneNode(false).outerHTML;
> };
> - return tmp.getElementsByTagName("*")[0];
> + return tmp.getElementsByTagName(oNode.nodeName)[0];
> };
> }catch(e){ };
> };
> _______________________________________________
> kupu-checkins mailing list
> kupu-checkins at codespeak.net
> http://codespeak.net/mailman/listinfo/kupu-checkins
>
More information about the kupu-checkins
mailing list