[Webkit-unassigned] [Bug 72818] Web Inspector: console.clear() implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 20 03:00:26 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=72818





--- Comment #3 from Milos Gavrilovic <gavra at arvag.net>  2011-11-20 03:00:26 PST ---
Hey Pavel,

i really think there is a valid case here, for example few days ago i was doing some credit card validation where i had about 3-4 client requests on how to handle different scenarios:

1. credit card type
2. credit card length
3. credit card prefix
4. MOD10 check of credit card number: http://www.beachnet.com/~hstiles/cardtype.html

This is fired each time when validation for that credit card field is called(onkeyup or on blur):

console.clear()
for(loop through all possible credit cards that client accepts) {
    if(credit card type 1) {
        console.log("Not accepted credit card")
        continue
    }

    // here comes several more if checks and console.log() prints out whats happening

}

In this situation it really helps that you can clear content of console every time you try to validate inputted number. In my case for this validation there was about 5-6 different console.log() statements and i think the best way really is just to clear everything, i.e. not having to do any of the following:

1. console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
2. console.log("----------------------------------------")
3. calling clear() directly in console

I guess any complicated for statement, that you are calling a lot, with bunch of if statements inside where each prints out something via console.log(), is a valid case to use console.clear().

I'm not sure how to reopen this ticket, sooooo i would like to ask you guys to think about this one and reopen this ticket.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list