Closed Bug 776864 Opened 9 years ago Closed 8 years ago
Paris bindings for DOM Events
In the main thread it is probably easiest to make events to parent to window object, similarly to XHR etc. However, I don't know how XHR works in JS components where window isn't available. I won't touch event implementations in workers.
https://developer.mozilla.org/en/Mozilla/WebIDL_bindings doesn't seem to tell what happens if GetParentObject returns null. (Also, I don't quite understand the comments " returns the same object every time" ... "For example, nsINode::GetParentObject returns the node's owner document". Obviously owner document may change.) ("if your object can only be reflected into JS by creating it, not by retrieving it from somewhere" needs also some example)
If GetParentObject() returns null, then you get parented to the global of the object you're being gotten from. To the extent that this can be a different object, you can get weird behavior across GC. For components, returning null is fine, since there should be only one global involved. > Obviously owner document may change. We explicitly fix up the parenting when it changes, for nodes. You _can_ do the same thing in other cases, but it's rather ... complicated. > needs also some example ImageData. But I'll fill that out more. I can't edit the article at the moment, unfortunately: devmo is not editable, and the import into the new wiki is corrupt (bug 775952). Once that's sorted out, I'll update the docs with the above.
In case this is useful to you
Maybe. Though, I want probably autogenerate webidl->xpidl calls, or xpidl->webidl. And yes, I've been über slow with this. I need to do some smaller webidl changes first to get more familiar with it.
> Though, I want probably autogenerate webidl->xpidl calls, Note that mccr8 is also working on something like that...
That's bug 785193. I haven't actually started writing any Python yet. I'm still experimenting with what it needs to look like. The next step is to start understanding the example class generator, as I think I'll want to use that the inject my glue code into.
Attachment #680357 - Attachment is obsolete: true
As far as I see, this is now fixed.
Assignee: bugs → nobody
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.