0

I've tried the VLC browser plugin and I've been quite satisfied with it. But when I click inside the VLC frame, the click event is not delegated to the browser after VLC eventually has handled it, i.e. there is no bubbling. Is this the default behavior for browsers/browser plugins in general, i.e. that the browser just looks at the <embed> or <object> and decides that it is outside of its responsibility, and can browser plugins bubble this event if they want to?

I know that this might vary depending on both browsers and types of plugins (NPAPI/ActiveX), and that makes the question even more interesting, IMHO.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Yngve Sneen Lindal
  • 1,013
  • 3
  • 12
  • 24

1 Answers1

2

In theory, NPAPI plugins can decide whether a mouse event should be considered handled, and thus stop, or should bubble, based on the return from NPP_HandleEvent. In practice, several of the most popular plugins always return 0, which means that browsers generally just ignore the return value (to avoid weird behavior like double-clicks on a plugin selecting all text on the web page). This is certainly true for Chrome, and IIRC it's true for Safari and Firefox as well.

smorgan
  • 20,228
  • 3
  • 47
  • 55