123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613 |
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *|
- *| IBM Cognos Products: PS
- *|
- *| (C) Copyright IBM Corp. 2011
- *|
- *| US Government Users Restricted Rights - Use, duplication or
- *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *|
- *+------------------------------------------------------------------------+
- */
- XMLDocument.prototype.f_getHALDefaultAttributeLookup=function(){
- if(!this.m_oHALDefaultAttributeLookup){
- this.m_oHALDefaultAttributeLookup=C_XmlSerializer.F_ParseDefaultAttributes(this);
- }
- return this.m_oHALDefaultAttributeLookup;
- };
- XMLDocument.prototype.super_createElement=XMLDocument.prototype.createElement;
- XMLDocument.prototype.createElement=function(_1){
- var n=this.super_createElement(_1);
- if(this.doctype){
- var _2=this.f_getHALDefaultAttributeLookup()[_1];
- if(_2){
- for(var _3 in _2){
- n.setAttribute(_3,_2[_3]);
- }
- }
- }
- return n;
- };
- XMLDocument.prototype.super_createElementNS=XMLDocument.prototype.createElementNS;
- XMLDocument.prototype.createElementNS=function(_4,_5){
- var n=this.super_createElementNS(_4,_5);
- if(this.doctype){
- var _6=this.f_getHALDefaultAttributeLookup()[_5];
- if(_6){
- for(var _7 in _6){
- n.setAttribute(_7,_6[_7]);
- }
- }
- }
- return n;
- };
- XMLDocument.prototype.createNode=function(_8,_9,_a){
- switch(_8){
- case U_XML.K_iNODE_ELEMENT:
- if(_a&&_a!=""){
- return this.createElementNS(_a,_9);
- }else{
- return this.createElement(_9);
- }
- case U_XML.K_iNODE_ATTRIBUTE:
- if(_a&&_a!=""){
- return this.createAttributeNS(_a,_9);
- }else{
- return this.createAttribute(_9);
- }
- case U_XML.K_iNODE_TEXT:
- return this.createTextNode("");
- case U_XML.K_iNODE_CDATA_SECTION:
- return this.createCDATASection("");
- case U_XML.K_iNODE_PROCESSING_INSTRUCTION:
- return this.createProcessingInstruction(_9,"");
- case U_XML.K_iNODE_COMMENT:
- return this.createComment("");
- case U_XML.K_iNODE_DOCUMENT_FRAGMENT:
- return this.createDocumentFragment();
- case U_XML.K_iNODE_ENTITY_REFERENCE:
- return null;
- case U_XML.K_iNODE_ENTITY:
- case U_XML.K_iNODE_DOCUMENT:
- case U_XML.K_iNODE_DOCUMENT_TYPE:
- case U_XML.K_iNODE_NOTATION:
- return null;
- default:
- return null;
- }
- };
- XMLDocument.prototype.nodeFromID=function(_b){
- return this.getElementById(_b);
- };
- XMLDocument.prototype.loadXML=function(_c){
- var _d=(new DOMParser()).parseFromString(_c,"text/xml");
- while(this.hasChildNodes()){
- this.removeChild(this.lastChild);
- }
- var _e=_d.childNodes.length;
- for(var i=0;i<_e;i++){
- this.appendChild(this.importNode(_d.childNodes.item(i),true));
- }
- return true;
- };
- Node.prototype.__defineGetter__("text",function(){
- if(this.nodeType==U_XML.K_iNODE_ATTRIBUTE){
- return this.value;
- }
- return this.textContent;
- });
- Node.prototype.__defineSetter__("text",function(s){
- if(this.nodeType==U_XML.K_iNODE_ATTRIBUTE){
- return this.value=s;
- }
- return this.textContent=s;
- });
- Node.prototype.selectSingleNode=function(_f){
- var doc=this.ownerDocument||this;
- var _10=null;
- if(doc.m_oNamespaces){
- _10={};
- _10.m_oNamespaces=doc.m_oNamespaces;
- _10.m_oNormalResolver=doc.createNSResolver(doc.documentElement);
- _10.lookupNamespaceURI=function(_11){
- return this.m_oNamespaces[_11]||this.m_oNormalResolver.lookupNamespaceURI(_11);
- };
- }
- return doc.evaluate(_f,this,_10,9,null).singleNodeValue;
- };
- Node.prototype.selectNodes=function(_12){
- var doc=this.ownerDocument||this;
- var _13=null;
- if(doc.m_oNamespaces){
- _13={};
- _13.m_oNamespaces=doc.m_oNamespaces;
- _13.m_oNormalResolver=doc.createNSResolver(doc.documentElement);
- _13.lookupNamespaceURI=function(_14){
- return this.m_oNamespaces[_14]||this.m_oNormalResolver.lookupNamespaceURI(_14);
- };
- }
- var _15=doc.evaluate(_12,this,_13,5,null);
- var a=[];
- for(var n=_15.iterateNext();n;n=_15.iterateNext()){
- a.push(n);
- }
- a.item=U_DOM.F_Item;
- return a;
- };
- XMLDocument.prototype.setProperty=function(_16,_17){
- if(_16=="SelectionNamespaces"){
- this.m_sSelectionNamespaces=_17;
- this.m_oNamespaces={};
- var _18=(_17.indexOf(" ")==-1)?[_17]:_17.split(" ");
- for(var i=0;i<_18.length;i++){
- var a=_18[i].split("=");
- var _19=a[0].replace(/^xmlns:(.+)/,"$1");
- var _1a=a[1].replace(/['"](.+)['"]/,"$1");
- this.m_oNamespaces[_19]=_1a;
- }
- }
- };
- XMLDocument.prototype.getProperty=function(_1b){
- return ((_1b=="SelectionNamespaces")?(this.m_sSelectionNamespaces||""):"");
- };
- if(typeof document.activeElement=="undefined"){
- HTMLDocument.prototype.__defineGetter__("activeElement",function(){
- return window.h_elActiveElement;
- });
- }
- HTMLDocument.prototype.__defineGetter__("parentWindow",function(){
- return this.defaultView;
- });
- HTMLDocument.prototype.releaseCapture=function(){
- G_CaptureManager.F_StopCapture();
- };
- HTMLElement.prototype.contains=function(_1c){
- return ((this==_1c)||Boolean(this.compareDocumentPosition(_1c)&16));
- };
- HTMLElement.prototype.__defineGetter__("parentElement",function(){
- return this.parentNode;
- });
- HTMLElement.prototype.__defineGetter__("onmousewheel",function(){
- return this.m_fnOnMouseWheel?this.m_fnOnMouseWheel:null;
- });
- HTMLElement.prototype.__defineSetter__("onmousewheel",function(_1d){
- if(this.m_fnOnMouseWheel){
- this.removeEventListener("DOMMouseScroll",this.m_fnOnMouseWheel,false);
- delete this.m_fnOnMouseWheel;
- }
- if(_1d){
- this.addEventListener("DOMMouseScroll",_1d,false);
- this.m_fnOnMouseWheel=_1d;
- }
- });
- HTMLElement.prototype.__defineGetter__("currentStyle",function(){
- return this.ownerDocument.defaultView.getComputedStyle(this,null);
- });
- HTMLElement.prototype.__defineSetter__("onreadystatechange",function(_1e){
- return this.onload=_1e;
- });
- HTMLElement.prototype.__defineGetter__("readyState",function(){
- return "complete";
- });
- HTMLElement.m_iUniqueIdCounter=1;
- HTMLElement.prototype.__defineGetter__("uniqueID",function(){
- var _1f=this.getAttribute("id");
- if(!_1f){
- _1f="hal__el__uniqueID__"+HTMLElement.m_iUniqueIdCounter++;
- this.setAttribute("id",_1f);
- }
- return _1f;
- });
- CSSStyleDeclaration.prototype.__defineSetter__("styleFloat",function(s){
- return this.cssFloat=s;
- });
- CSSStyleSheet.prototype.addRule=function(_20,_21,_22){
- this.insertRule(_20+"{"+_21+";}",((_22==-1)||(isNaN(_22)))?this.cssRules.length:_22);
- return -1;
- };
- CSSStyleSheet.prototype.removeRule=function(_23){
- this.deleteRule(_23?_23:0);
- };
- Event.prototype.__defineGetter__("srcElement",function(){
- if(this.m_elCaptureTarget){
- return this.m_elCaptureTarget;
- }
- return (this.target.nodeType==U_XML.K_iNODE_TEXT)?this.target.parentNode:this.target;
- });
- Event.prototype.__defineGetter__("fromElement",function(){
- if((this.type!="mouseout")&&(this.type!="mouseover")){
- G_Debug.F_Print("fromElement accessed with wrong event type");
- return null;
- }
- return (this.type=="mouseout")?this.target:this.relatedTarget;
- });
- Event.prototype.__defineGetter__("toElement",function(){
- if((this.type!="mouseout")&&(this.type!="mouseover")){
- G_Debug.F_Print("toElement accessed with wrong event type");
- return null;
- }
- return (this.type=="mouseout")?this.relatedTarget:this.target;
- });
- Event.prototype.__defineSetter__("cancelBubble",function(b){
- if(b){
- this.stopPropagation();
- this.m_bCancelBubble=true;
- }
- return this.m_bCancelBubble;
- });
- Event.prototype.__defineGetter__("cancelBubble",function(){
- return Boolean(this.m_bCancelBubble);
- });
- Event.prototype.__defineSetter__("returnValue",function(b){
- if(!b){
- this.preventDefault();
- }
- });
- var G_CaptureManager={};
- G_CaptureManager.f_getEvents=function(){
- if(!this.m_aEvents){
- this.m_aEvents=["mousedown","mouseup","mousemove","click","dblclick","mouseover","mouseout"];
- if(G_BrowserInfo.M_bIsTouchDevice){
- this.m_aTouchEvents=["touchstart","touchmove","touchend","touchcancel"];
- this.m_oTouchEvents=this.m_aTouchEvents.F_CreateDictionary();
- this.m_aEvents=this.m_aEvents.concat(this.m_aTouchEvents);
- }
- }
- return this.m_aEvents;
- };
- G_CaptureManager.m_aAccessibilityEvents=["focus","blur"];
- G_CaptureManager.F_StartCapture=function(el){
- if(this.m_elWithCapture){
- this.m_elWithCapture.releaseCapture();
- }
- this.m_elWithCapture=el;
- this.f_setEventHandlers(true);
- this.f_createIFrameBlockers();
- };
- G_CaptureManager.f_setIFrameEventHandlers=function(_24,d,_25){
- var nl=d.getElementsByTagName("IFRAME");
- for(var i=0;i<nl.length;i++){
- var frm=nl.item(i);
- var d=frm.contentWindow.document;
- var _26=this.f_getEvents();
- for(var j=0;j<_26.length;j++){
- if(_24){
- d.addEventListener(_26[j],G_CaptureManager.f_captureEventHandler,true);
- }else{
- d.removeEventListener(_26[j],G_CaptureManager.f_captureEventHandler,true);
- }
- }
- if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
- for(var j=0;j<this.m_aAccessibilityEvents.length;j++){
- if(_24){
- d.addEventListener(this.m_aAccessibilityEvents[j],G_CaptureManager.f_captureEventHandler,true);
- }else{
- d.removeEventListener(this.m_aAccessibilityEvents[j],G_CaptureManager.f_captureEventHandler,true);
- }
- }
- }
- }
- };
- G_CaptureManager.f_createIFrameBlockers=function(){
- var nl=document.getElementsByTagName("IFRAME");
- this.m_aBlockers=[];
- for(var i=0;i<nl.length;i++){
- this.m_aBlockers.push(this.f_createIFrameBlocker(nl.item(i)));
- }
- };
- G_CaptureManager.f_createIFrameBlocker=function(_27){
- var _28=U_DOM.F_GetRelativeOffset(_27,document.body);
- var _29=document.body.appendChild(document.createElement("DIV"));
- _29.onkeydown=U_DOM.f_stopTabKey;
- _29.style.backgroundImage="url(../hal/images/blank.gif)";
- _29.className="clsIFrameBlockerSetCapture";
- _29.style.left=_28.left+"px";
- _29.style.top=_28.top+"px";
- _29.style.width=_27.offsetWidth+"px";
- _29.style.height=_27.offsetHeight+"px";
- _29.style.visibility="visible";
- return _29;
- };
- G_CaptureManager.F_ShowIFrameBlockers=function(){
- this.m_aBlockers.F_ForEach(function(el){
- el.style.visibility="visible";
- });
- };
- G_CaptureManager.F_HideIFrameBlockers=function(){
- this.m_aBlockers.F_ForEach(function(el){
- el.style.visibility="hidden";
- });
- };
- G_CaptureManager.f_removeIFrameBlockers=function(){
- this.m_aBlockers.F_ForEach(function(el){
- el.parentNode.removeChild(el);
- });
- this.m_aBlockers=[];
- };
- G_CaptureManager.F_StopCapture=function(el){
- if(el&&(el!=this.m_elWithCapture)){
- return;
- }
- if(!this.m_elWithCapture){
- return;
- }
- this.f_removeIFrameBlockers();
- this.f_setEventHandlers(false);
- if(this.m_elWithCapture.onlosecapture){
- this.m_elWithCapture.onlosecapture();
- }
- this.m_elWithCapture=null;
- };
- G_CaptureManager.F_OnWindowBlur=function(e){
- if(e.srcElement==document){
- if(G_CaptureManager.m_elWithCapture){
- G_CaptureManager.m_elWithCapture.releaseCapture();
- }
- }
- };
- G_CaptureManager.f_setEventHandlers=function(_2a){
- if(_2a){
- }else{
- }
- window.onblur=_2a?this.F_OnWindowBlur:null;
- var d=document;
- var _2b=this.f_getEvents();
- for(var i=0;i<_2b.length;i++){
- if(_2a){
- d.addEventListener(_2b[i],this.f_captureEventHandler,true);
- }else{
- d.removeEventListener(_2b[i],this.f_captureEventHandler,true);
- }
- }
- if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
- for(var j=0;j<this.m_aAccessibilityEvents.length;j++){
- if(_2a){
- d.addEventListener(this.m_aAccessibilityEvents[j],this.f_captureEventHandler,true);
- }else{
- d.removeEventListener(this.m_aAccessibilityEvents[j],this.f_captureEventHandler,true);
- }
- }
- }
- };
- G_CaptureManager.f_captureEventHandler=function(e){
- var _2c=G_CaptureManager.m_elWithCapture;
- if(_2c){
- var _2d=e.type;
- var _2e="on"+_2d;
- if(_2c[_2e]){
- _2c[_2e](e);
- if((G_CaptureManager.m_elWithCapture!=_2c)&&!e.cancelBubble){
- var _2f=G_BrowserInfo.M_bIsTouchDevice&&G_CaptureManager.m_oTouchEvents[_2d];
- var d=_2c.ownerDocument;
- var _30=d.createEvent(_2f?"TouchEvent":"MouseEvents");
- if(_2f){
- _30.initTouchEvent(_2d,true,true,d.defaultView,0,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.touches,e.targetTouches,e.changedTouches,e.scale,e.rotation);
- }else{
- _30.initMouseEvent(_2d,true,true,d.defaultView,0,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget);
- }
- var el=G_BrowserInfo.M_bIsFirefox?e.explicitOriginalTarget:e.target;
- el=(el.nodeType==U_XML.K_iNODE_TEXT?el.parentNode:el);
- _30.m_elCaptureTarget=el;
- ((G_BrowserInfo.M_bIsFirefox&&(el==_2c))?el.parentNode:el).dispatchEvent(_30);
- }
- }
- }
- e.stopPropagation();
- };
- G_CaptureManager.f_onKeyDown=function(e){
- e=e||window.event;
- if(e.keyCode==U_DOM.K_iKeyEscape){
- G_CaptureManager.F_StopCapture();
- }
- };
- Element.prototype.super_removeAttribute=Element.prototype.removeAttribute;
- Element.prototype.removeAttribute=function(_31){
- var n=this.super_removeAttribute(_31);
- var d=this.ownerDocument;
- if(d.doctype&&!(d instanceof HTMLDocument)){
- var _32=d.f_getHALDefaultAttributeLookup()[this.nodeName];
- if(_32&&_32[_31]){
- this.setAttribute(_31,_32[_31]);
- }
- }
- };
- if(!window["requestAnimationFrame"]){
- window.requestAnimationFrame=(window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame);
- }
- if(!window["cancelAnimationFrame"]){
- window.cancelAnimationFrame=(window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame);
- }
- XMLDocument.prototype.__defineGetter__("parseError",function(){
- var _33="http://www.mozilla.org/newlayout/xml/parsererror.xml";
- var n=this.documentElement;
- var _34={};
- _34.errorCode=0;
- _34.srcText=null;
- _34.reason=null;
- _34.url=null;
- _34.line=0;
- _34.linepos=0;
- if(n==null){
- _34.errorCode=2;
- _34.reason="The document element is empty. This implies that the system cannot locate the object specified.";
- }else{
- if(n.nodeName=="parsererror"&&n.namespaceURI==_33){
- _34.errorCode=1;
- var _35=n.getElementsByTagNameNS(_33,"sourcetext")[0];
- if(_35!=null){
- _34.srcText=_35.firstChild.data;
- }
- var _36=n.firstChild.data;
- var _37=_36.indexOf("Location: ");
- var _38=_37+"Location: ".length;
- var _39=_36.indexOf("Line Number ");
- var _3a=_39+"Line Number ".length;
- var _3b=_36.indexOf("Column ");
- var _3c=_3b+"Column ".length;
- if(_37!=-1&&_39!=-1&&_3b!=-1){
- _34.reason=_36.substring(0,_37);
- _34.url=_36.substring(_38,_39);
- _34.line=_36.substring(_3a,_3b);
- _34.line=parseInt(_34.line,10);
- _34.linepos=_36.substring(_3c);
- _34.linepos=parseInt(_34.linepos,10);
- }else{
- _34.reason=n.firstChild.data;
- }
- }
- }
- return _34;
- });
- if(typeof document.elementFromPoint=="undefined"){
- HTMLDocument.prototype.elementFromPoint=function(x,y){
- this.addEventListener("mousemove",this.f_elementFromPointListener,false);
- var _3d=this.documentElement.getBoundingClientRect();
- var e=this.createEvent("MouseEvents");
- e.M_bIsElementFromPointEvent=true;
- e.initMouseEvent("mousemove",true,false,this.defaultView,0,x+_3d.screenX,y+_3d.screenY,x,y,false,false,false,false,0,null);
- this.dispatchEvent(e);
- this.removeEventListener("mousemove",this.f_elementFromPointListener,false);
- return this.m_elElementFromPoint;
- };
- }
- HTMLDocument.prototype.m_elElementFromPoint=null;
- HTMLDocument.prototype.f_elementFromPointListener=function(e){
- this.m_elElementFromPoint=e.explicitOriginalTarget;
- if(this.m_elElementFromPoint.nodeType==U_XML.K_iNODE_TEXT){
- this.m_elElementFromPoint=this.m_elElementFromPoint.parentNode;
- }
- switch(this.m_elElementFromPoint.nodeName){
- case "HTML":
- case "#document":
- this.m_elElementFromPoint=this.getElementsByTagName("BODY").item(0);
- }
- e.preventDefault();
- e.stopPropagation();
- };
- if(G_BrowserInfo.M_bFirefox4OrLater){
- }
- Node.prototype.__defineGetter__("xml",function(){
- return (new XMLSerializer()).serializeToString(this);
- });
- HTMLElement.prototype.__defineGetter__("innerText",function(){
- return this.textContent;
- });
- HTMLElement.prototype.__defineSetter__("innerText",function(s){
- if(this.nodeName.toLowerCase()=="input"||this.nodeName.toLowerCase()=="textarea"){
- this.value=s;
- }else{
- var _3e=String(s).F_HTMLEncode().replace(/\n/g,"<BR/>").replace(/\s\s/g," ");
- return this.innerHTML=(_3e==" ")?" ":_3e;
- }
- });
- HTMLElement.prototype.__defineGetter__("outerHTML",function(){
- return this.xml;
- });
- HTMLElement.prototype.__defineSetter__("outerHTML",function(s){
- var rng=this.ownerDocument.createRange();
- rng.setStartBefore(this);
- var _3f=rng.createContextualFragment(s);
- this.parentNode.replaceChild(_3f,this);
- });
- if(!G_BrowserInfo.M_bFirefox13OrLater){
- var v_fnST=window.setTimeout;
- Window.prototype.setTimeout=function(_40,_41){
- if(typeof (_40)=="function"){
- return v_fnST.apply(window,[HAL_setTimeout.F_CreateCallback(_40),_41]);
- }else{
- return v_fnST.apply(window,[_40,_41]);
- }
- };
- var HAL_setTimeout=function(_42){
- _42();
- };
- }
- Node.prototype.selectNodes=function(_43){
- var doc=this.ownerDocument?this.ownerDocument:this;
- var _44=null;
- if(doc.m_oNamespaces){
- _44={};
- _44.m_oNamespaces=doc.m_oNamespaces;
- _44.m_oNormalResolver=doc.createNSResolver(doc.documentElement);
- _44.lookupNamespaceURI=function(_45){
- return this.m_oNamespaces[_45]?this.m_oNamespaces[_45]:this.m_oNormalResolver.lookupNamespaceURI(_45);
- };
- }
- var _46=doc.evaluate(_43,this,_44,5,null);
- var a=[];
- for(var n=_46.iterateNext();n;n=_46.iterateNext()){
- a.push(n);
- }
- a.item=U_DOM.F_Item;
- return a;
- };
- XMLDocument.prototype.__defineGetter__("parseError",function(){
- var n=this.documentElement;
- var _47={};
- _47.errorCode=0;
- _47.srcText=null;
- _47.reason=null;
- _47.url=null;
- _47.line=0;
- _47.linepos=0;
- if(n==null){
- _47.errorCode=2;
- _47.reason="The document element is empty. This implies that the system cannot locate the object specified.";
- }else{
- if(n.getElementsByTagName("parsererror").length>0){
- _47.errorCode=1;
- var _48=n.getElementsByTagName("parsererror")[0];
- if(_48!=null){
- _47.srcText=_48.innerText;
- var _49=_48.childNodes[1]?_48.childNodes[1].innerText:"";
- var _4a=_49.indexOf("line ")+"line ".length;
- var _4b=_49.indexOf(" at column ");
- var _4c=_49.indexOf(" at column ")+" at column ".length;
- var _4d=_49.indexOf(": ");
- if(_4a!=-1&&_4d!=-1&&_4b!=-1){
- _47.line=parseInt(_49.substring(_4a,_4b),10);
- _47.linepos=parseInt(_49.substring(_4c,_4d),10);
- _47.reason=_49.substring(_4d+2);
- }else{
- _47.reason=_49;
- }
- }
- }
- }
- return _47;
- });
- Node.prototype.__defineGetter__("xml",function(){
- if(this.nodeType==U_XML.K_iNODE_DOCUMENT_TYPE&&this.ownerDocument&&this.ownerDocument.rawDTD){
- return this.ownerDocument.rawDTD;
- }
- return (new XMLSerializer()).serializeToString(this);
- });
- Attr.prototype.__defineGetter__("specified",function(){
- var n=this.ownerElement;
- var d=n.ownerDocument;
- if(d.doctype){
- if(!d.m_oHALDefaultAttributeLookup){
- d.m_oHALDefaultAttributeLookup=C_XmlSerializer.F_ParseDefaultAttributes(d);
- }
- var _4e=d.m_oHALDefaultAttributeLookup[n.nodeName];
- return !(_4e&&_4e[this.name]&&(_4e[this.name]===this.value));
- }
- return true;
- });
- if(window["Touch"]){
- Touch.prototype.__defineGetter__("srcElement",function(){
- if(this.m_elCaptureTarget){
- return this.m_elCaptureTarget;
- }
- return (this.target.nodeType==U_XML.K_iNODE_TEXT)?this.target.parentNode:this.target;
- });
- Touch.prototype.__defineSetter__("srcElement",function(el){
- this.target=el;
- });
- Event.prototype.__defineSetter__("srcElement",function(el){
- this.target=el;
- });
- }
|