|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2005-03-04 10:00 UTC] derick@php.net
  [2005-03-09 11:48 UTC] jeanpierre dot vincent at gmail dot com
  [2005-03-09 21:40 UTC] sniper@php.net
  [2005-03-17 01:00 UTC] php-bugs at lists dot php dot net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Sat Oct 25 02:00:01 2025 UTC | 
Description: ------------ the function com_event_sink is documented like this: bool com_event_sink ( variant comobject, object sinkobject [, mixed sinkinterface] ). but the sinkinterface does not take value of the default com object event interface so optional is useless because the developper must know all default object event sink interface. Reproduce code: --------------- <?php class IEEventSinker { var $terminated = false; // when all objects of page are loaded function DocumentComplete(&$dom, $url) { GLOBAL $ie; $GLOBALS['elem']=$ie->document->getElementById('test'); if ($GLOBALS['elem']!=null) { com_event_sink($GLOBALS['elem'],$this /*,'HTMLAnchorEvents'*/); } } // when closing browser function OnQuit() { echo "Quit!\n"; $this->terminated = true; } // when clicking in url function onclick() { echo "click!\n"; } } $ie = new COM("InternetExplorer.Application"); // note that you don't need the & for PHP 5! $sink = new IEEventSinker(); com_event_sink($ie, $sink, "DWebBrowserEvents2"); $ie->Visible = true; $ie->Navigate('c:\test.html'); while(!$sink->terminated) { com_message_pump(4000); } $ie = null; ?> ///////////////////////////////////////////////////////// c:\test.html <html> <body > <A id='test' href='#'>test</A> </body> </html> Expected result: ---------------- browser is launching, navigate on test.html file. when we click to url test the message is to be written in the console : Click! Actual result: -------------- no message written.