Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DOMHTMLFormElement not emitting "submit" event?



Hi everyone,

I am writing a WebPlugin and need to run some code before a form is submitted.

Basically, I have this so far:

- (void)webPlugInStart
{
    DOMHTMLObjectElement *containingElement = [arguments objectForKey:WebPlugInContainingElementKey];
DOMHTMLFormElement *formElement = [[containingElement parentNode] parentNode];
[formElement addEventListener:@"submit" listener:self useCapture:NO];
}

- (void)handleEvent:(DOMEvent *)event
{
NSLog(@"EVENT FIRED: %@", [event type]);
}

The page looks like this:

<form>
<p>
<object></object>
</p>
</form>


Unfortunately, the "submit" event is not firing!  I can get "click" events, etc... but the form just submits without calling my event handler.

The odd thing, however, is that this used to work!  Has there been a change in recent updates of WebKit?

System profiler says:


 System Version: Mac OS X 10.5.2 (9C7010)
  Kernel Version: Darwin 9.2.2

WebKit:

  Version: 5525.18
  Last Modified: 4/22/08 9:31 AM
  Get Info String: 5525.18, Copyright 2003-2007 Apple Inc.
  Location: /System/Library/Frameworks/WebKit.framework
  Private: No


Any ideas?

Thanks,

Ian.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.