diff options
author | Julien Dramaix <julien.dramaix@gmail.com> | 2014-09-16 19:21:03 -0400 |
---|---|---|
committer | Julien Dramaix <julien.dramaix@gmail.com> | 2014-09-16 19:21:03 -0400 |
commit | e8e5739fc12d16534693f4714295e50590758be4 (patch) | |
tree | fcbcc0017c42189305cc8c8b71c92298490404ba | |
parent | 1b60c52b88b35970f64052dce59f0fd0d121be73 (diff) | |
parent | c757c3d3c68f7ea49d7eeece9f7d41b2facbdfbf (diff) | |
download | gwtquery-e8e5739fc12d16534693f4714295e50590758be4.tar.gz gwtquery-e8e5739fc12d16534693f4714295e50590758be4.zip |
Merge pull request #297 from manolo/master
Fix Exception when cleaning up. Support for web component tag names
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java | 9 |
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) |