summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-11-03 22:42:40 (GMT)
committer Daniel Silverstone <dsilvers@digital-scurf.org>2012-11-03 22:42:40 (GMT)
commite95c95dd4d22f9184f30b8f986a2a16a47c9f3a8 (patch)
tree7723d990ec60c4647dd1d956e84a557e4d6f7e41
parentcfb2721a875a547963aad5ea41bd064b50b2eb0d (diff)
downloadlibdom-e95c95dd4d22f9184f30b8f986a2a16a47c9f3a8.tar.gz
libdom-e95c95dd4d22f9184f30b8f986a2a16a47c9f3a8.tar.bz2
Do not validate event names and use dom_string_byte_length for fastness
-rw-r--r--src/core/node.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/node.c b/src/core/node.c
index ca8fd72..e0f07b2 100644
--- a/src/core/node.c
+++ b/src/core/node.c
@@ -2326,7 +2326,7 @@ dom_exception _dom_node_dispatch_event(dom_event_target *et,
evt->in_dispatch = true;
}
- if (evt->type == NULL || dom_string_length(evt->type) == 0) {
+ if (evt->type == NULL || dom_string_byte_length(evt->type) == 0) {
return DOM_UNSPECIFIED_EVENT_TYPE_ERR;
}
@@ -2340,10 +2340,6 @@ dom_exception _dom_node_dispatch_event(dom_event_target *et,
return DOM_NO_ERR;
}
- if (_dom_validate_ncname(evt->type) == false) {
- return DOM_INVALID_CHARACTER_ERR;
- }
-
*success = true;
/* Compose the event target list */