Code Monkey home page Code Monkey logo

Comments (13)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
I might create an optional "strict" lib that can be included when debugging 
otherwise
I don't want to bloat the code with lots of unnecessary checks on arguments.

Original comment by [email protected] on 1 May 2007 at 8:07

  • Changed state: Accepted
  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
Maybe it's more a job for a lint, instead of a strict modus... Like the array 
literal [1,2,] will not run in all 
browsers...

Original comment by [email protected] on 10 Jul 2007 at 9:16

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
A debug module could include code like this:


extend(EventTarget, {
    addEventListener: function(target, type, listener) {
        assert(arguments.length >= 3, "Not enough arguments.", SyntaxError);
        assert(target && target.nodeType, "Invalid target.", TypeError);
        assertType(listener, "function");
        return base(this, arguments);
    },

    dispatchEvent: function(target, event) {
        assert(arguments.length >= 2, "Not enough arguments.", SyntaxError);
        return base(this, arguments);
    },

    removeEventListener: function(target, type, listener) {
        assert(arguments.length >= 3, "Not enough arguments.", SyntaxError);
        assertType(listener, "function");
        return base(this, arguments);
    }
});

Original comment by [email protected] on 12 Jul 2007 at 5:00

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
Now I get what you mean.
I'll get to it, when I've got time. Let me own this bug.

Original comment by [email protected] on 12 Jul 2007 at 5:05

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
I checked in some code that you can use as a starting point:

http://base2.googlecode.com/svn/trunk/src/base2/DOM/strict/

Original comment by [email protected] on 12 Jul 2007 at 8:49

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
That pretty much fixes this bug ;-)

But now we have an entry-point for these kind of bugs.

Original comment by [email protected] on 13 Jul 2007 at 3:12

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
Ha ha. I just noticed that my examples are wrong as I'm missing the useCapture
parameter. :-)

Original comment by [email protected] on 13 Jul 2007 at 3:26

  • Changed state: Started

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
Brilliant

Original comment by [email protected] on 13 Jul 2007 at 3:35

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
I had to change the title of this. It was bugging me. :-P

Original comment by [email protected] on 13 Jul 2007 at 5:42

  • Changed title: addEventListener not reporting errors consistenly across browsers

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024

Original comment by [email protected] on 14 Jul 2007 at 6:57

  • Added labels: Browser-Mozilla, Module-base2.DOM

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
Closing bug.

Original comment by [email protected] on 14 Jul 2007 at 7:47

  • Changed state: Fixed

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
Re-opening bug.

assertArity is not a known function. Is probably in your new lang/main1.js?

And shouldn't we put assertTarget in a seperate file (domAssert.js)?

Original comment by [email protected] on 21 Jul 2007 at 2:01

  • Changed state: Re-open

from base2.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 31, 2024
assertArity is there now. Closing bug.

Original comment by [email protected] on 14 Sep 2007 at 7:23

  • Changed state: Fixed

from base2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.