Req #52151 [Opn->Nab]: implement DOM3 events
Edit report at https://bugs.php.net/bug.php?id=52151&edit=1
ID: 52151
Updated by: requinix@php.net
Reported by: giorgio dot liscio at email dot it
Summary: implement DOM3 events
-Status: Open
+Status: Not a bug
Type: Feature/Change Request
Package: DOM XML related
Operating System: all
PHP Version: 5.3.2
Block user comment: N
Private report: N
New Comment:
This would require backend work by the libxml folks that PHP could then use, and they don't
even support HTML 5 yet.
So closing NAB. If they ever add DOM events then we can reopen this.
Previous Comments:
------------------------------------------------------------------------
[2010-06-23 05:40:32] giorgio dot liscio at email dot it
Description:
------------
hi, why not extend DOM classes with addEventListener and removeEventListener methods. In php they
are useful as observer pattern
the propagation with two models (capturing / bubbling)
http://www.quirksmode.org/js/events_order.html
mutation events in dom3 events:
http://www.w3.org/TR/DOM-Level-3-Events/#events-mutationevents
http://www.w3.org/TR/DOM-Level-3-Events/#events-mutationnameevents
for example i can monitor a subtree with
$mysel->addEventListener("DOMSubtreeModified", array($this,'mycallback'),
false);
public function mycallback($event)
{
echo "subtree changed at " . (string)$event->relatedNodeArg;
}
list of events:
DOMSubtreeModified
DOMNodeInserted
DOMNodeRemoved
DOMNodeRemovedFromDocument
DOMNodeInsertedIntoDocument
DOMAttrModified
DOMElementNameChanged
DOMCharacterDataModified
DOMElementNameChanged
DOMAttributeNameChanged
thank you
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52151&edit=1
Thread (2 messages)