Catch undefined method calls in JS

    Date: 07/20/12 (Web Development)    Keywords: no keywords

    Hi!

    There is an interesting task. I need to catch any undefined calls in my JS code. Is there a solution?

    Imagine:

        function a() {
            alert('Hi, I'm a function!');
        }
    
        a(); // works great
    
        a.b(); // call undefined function
    


    So, are there any ways to catch calls a.b() in my function a()?

    Source: https://webdev.livejournal.com/581007.html

« Basic HTML Document || N00blet soup »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home