summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2013-02-22 22:17:33 (GMT)
committer John-Mark Bell <jmb@netsurf-browser.org>2013-02-22 22:17:33 (GMT)
commitce39675babdce5080265325039fce2d102210eab (patch)
tree81a8a1b8f0c74e7f3a824d5b7b8e767c18aa09e4
parent081cf689356ef9138b67da2c687883b9c3354a63 (diff)
downloadlibdom-ce39675babdce5080265325039fce2d102210eab.tar.gz
libdom-ce39675babdce5080265325039fce2d102210eab.tar.bz2
Notify user data handlers on deletion
-rw-r--r--src/core/node.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/node.c b/src/core/node.c
index 1323fca..1b06642 100644
--- a/src/core/node.c
+++ b/src/core/node.c
@@ -227,6 +227,11 @@ void _dom_node_finalise(dom_node_internal *node)
/* Destroy user data */
for (u = node->user_data; u != NULL; u = v) {
v = u->next;
+
+ if (u->handler != NULL)
+ u->handler(DOM_NODE_DELETED, u->key, u->data,
+ NULL, NULL);
+
dom_string_unref(u->key);
free(u);
}