Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13761 closed defect (fixed)

Making Functions with hitch and partial demo - IE8

Reported by: Rick Lacy Owned by: Tom Trenka
Priority: high Milestone: 1.7
Component: Documentation Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


I read this demo

It looks ok to me in Chrome and FF, but it seems to me the event handling is completely broken in IE. Clicking on anything just gives a JavaScript? error. Shouldn't the event handling be going after window.event and evt.srcElement if these are defined?

I like these tutorials, but please make them work cross-browser!

Change History (7)

comment:1 Changed 10 years ago by bill

Owner: set to Tom Trenka

Ah, because it's using

node.onclick = myObject.myHandler;

rather than (for 1.7 up):

on(node, "click", myObject.myHandler);

or for pre-1.7:

dojo.connect(node, "onclick", myObject, "myHandler");

comment:2 Changed 10 years ago by Tom Trenka

Resolution: wontfix
Status: newclosed

Think you missed the point; that first example (the one quoted here) was actually *supposed* to break; the point is showing how that kind of assignment doesn't work as a demonstration of execution context. Because of that, I did not worry about the semantics between the IE event model and the W3C one; all one needs to do is view the source to understand what's going on.

Because of that, marking as "wontfix" but thank you.

comment:3 Changed 10 years ago by Rick Lacy

I understood the point that the first demo wasn't suppoed to logically 'work'. However, I still would not expect a JavaScript? error on the demo. And because of not taking into account the IE event model, all portions of the tutorial, including the ones that are logically supposed to work with the sanitized this reference are broken, including

I can glean the point of the tutorial fine by looking at the source and I respect your decision not to fix it. However, I respectfully suggest you consider the marketing aspect here. Some other random person not well versed in JavaScript? could come across the demo considering Dojo for a project, see the JavaScript? error, and get turned off. It does not look good for a framework that's suppoed to help you with JavaScript? to throw an error on a demo page, no matter what the point of the demo was.

Oh well, I still found the tutorial interesting and this tutorial a day thing is very cool! Just please consider us IE users ;)

comment:4 Changed 10 years ago by Tom Trenka

I hear you. One thing I'd ask though: part of the point is that event models are *not* part of JavaScript?; those are host-specific (like IE). In some ways that's one of the things that I was shooting for--and even more to try to get away from the dichotomy of the two basic event models, since they have no place in a discussion of execution context with JS.

(Actual execution context is the same between the hosts, you're looking at the basic logging facility.)

We all need breaks sometimes but we'll look at this on Monday and see if we can't pull something small for ya. Personally I wasn't expecting this to be published when it was and thought it had been reviewed for things like this. Sorry dude.

comment:5 Changed 10 years ago by Rick Lacy

Good point about the event models being host-specific.

Thanks for perhaps taking a look at this. Didn't mean to come of as too stessed out about it. Just saw a potential issue in the docs and was trying to do my (small) part by reporting it.

btw, yay or nay, I'm pretty impressed with the speed you two responded to this! I can tell you it's not this good reporting things for some other frameworks that I've worked with in the past.

comment:6 Changed 10 years ago by Tom Trenka

Resolution: wontfixfixed

Eh, I turned around and did some dirty detection of fix this for you; I don't have control over deployment though so I have no idea when it will be pushed live. Probably not until Monday.

Cheers, dude and thanks for the catch.

comment:7 Changed 10 years ago by bill

Milestone: tbd1.7
Note: See TracTickets for help on using tickets.