php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52151 implement DOM3 events
Submitted: 2010-06-23 05:40 UTC Modified: 2018-05-05 20:23 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: giorgio dot liscio at email dot it Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5.3.2 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:

 

 [2010-06-23 05:40 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-05 20:23 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2018-05-05 20:23 UTC] requinix@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC