aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2014-09-16 17:36:33 +0200
committerManolo Carrasco <manolo@apache.org>2014-09-16 17:36:33 +0200
commitc757c3d3c68f7ea49d7eeece9f7d41b2facbdfbf (patch)
tree6fd88d66ce0dc0f2d45619083c309314c85e78b0
parente2a92239286341564538ac498d32c913e22be4e5 (diff)
downloadgwtquery-c757c3d3c68f7ea49d7eeece9f7d41b2facbdfbf.tar.gz
gwtquery-c757c3d3c68f7ea49d7eeece9f7d41b2facbdfbf.zip
Fix Exception when cleaning up. Support for web components tag names
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index 2570f411..ddf72475 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -171,7 +171,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
*/
private static DocumentStyleImpl styleImpl;
- private static RegExp tagNameRegex = RegExp.compile("<([\\w:]+)");
+ private static RegExp tagNameRegex = RegExp.compile("<([\\w:-]+)");
/**
* Static reference to the Widgets plugin
@@ -3848,9 +3848,10 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
if (name != null) {
if (dataCache.exists(id)) {
dataCache.getCache(id).delete(name);
- }
- if (dataCache.getCache(id).isEmpty()) {
- removeData(item, null);
+ if (dataCache.getCache(id).isEmpty()) {
+ // Save memory
+ removeData(item, null);
+ }
}
} else {
// when the element cache is empty we remove its entry to save memory (issue 132)