Changeset 1290


Ignore:
Timestamp:
11/22/10 16:48:22 (8 years ago)
Author:
ejucovy
Message:

For some reason, console.error seems to ignore additional parameters, and we need to pass a single string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Ticket1226/paraHandlerBest.js

    r1187 r1290  
    945945        setCursor(cursorAfter2); 
    946946        if ((selection.anchorNode != cAnchor) || (selection.anchorOffset != cOffset)) { 
    947           console.error('Actual anchor:', selection.anchorNode, 'Actual offset:', selection.anchorOffset, 'Expected anchor:', cAnchor, 'Expected offset:', cOffset); 
     947          console.error('Actual anchor: ' + selection.anchorNode + 
     948                       '\nActual offset: ' + selection.anchorOffset + 
     949                       '\nExpected anchor: ' + cAnchor + 
     950                       '\nExpected offset: ' + cOffset); 
    948951        } 
    949952      } else { 
    950         console.error('Actual anchor:', selection.anchorNode, 'Actual offset:', selection.anchorOffset, 'Expected anchor:', cAnchor, 'Expected offset:', cOffset); 
     953        console.error('Actual anchor: ' + selection.anchorNode + 
     954                     '\nActual offset: ' + selection.anchorOffset + 
     955                     '\nExpected anchor: ' + cAnchor + 
     956                     '\nExpected offset: ' + cOffset); 
    951957      } 
    952958    } 
     
    954960    result = xinha.getInnerHTML(); 
    955961    if (result == after) { 
    956       console.info('Success!') 
     962      console.info('Success!'); 
    957963    } else { 
    958       console.error('Was', null, before, null, 'Expected', null, after, null, 'Got', null, result, null) 
     964      console.error('Was: \n' + before + 
     965                   '\nExpected: \n' + after + 
     966                   '\nGot: \n' + result); 
    959967    } 
    960968    console.groupEnd(); 
Note: See TracChangeset for help on using the changeset viewer.