Changeset 1356


Ignore:
Timestamp:
02/04/18 04:28:16 (15 months ago)
Author:
gogo
Message:

#1245 - Fix percent width and height when using DomWalk?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/GetHtml/DOMwalk.js

    r1347 r1356  
    189189            // suck. 
    190190            // 
     191            // If you have a percent width in width/height then we may need to use nodeValue 
     192            //  it may well be OK to use nodeValue all the time these days, but it's easier 
     193            //  to just do it for these and not fix what's not broke 
     194            if(name == "width" || name == "height") 
     195            { 
     196              if(a.nodeValue.match(/%$/)) 
     197              { 
     198                value = a.nodeValue; 
     199              } 
     200              else 
     201              { 
     202                value = root[a.nodeName]; 
     203              } 
     204            } 
    191205            // Using Gecko the values of href and src are converted to absolute links 
    192             // unless we get them using nodeValue() 
    193             if ( typeof root[a.nodeName] != "undefined" && name != "href" && name != "src" && !(/^on/.test(name)) ) 
     206            // unless we get them using nodeValue()             
     207            else if ( typeof root[a.nodeName] != "undefined" && name != "href" && name != "src" && !(/^on/.test(name)) ) 
    194208            { 
    195209              value = root[a.nodeName]; 
Note: See TracChangeset for help on using the changeset viewer.