You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2019/05/17 19:06:25 UTC
[myfaces] branch 2.3.x updated: MYFACES-4291: 2 duplicate functions
in _Dom.js
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.3.x by this push:
new e3e77de MYFACES-4291: 2 duplicate functions in _Dom.js
e3e77de is described below
commit e3e77de7f6b936a432666f13e657c6cbd610ee36
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Fri May 17 21:06:15 2019 +0200
MYFACES-4291: 2 duplicate functions in _Dom.js
* removing duplicate code
---
.../META-INF/resources/myfaces/_impl/_util/_Dom.js | 29 ----------------------
1 file changed, 29 deletions(-)
diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
index 1e522a5..795aceb 100644
--- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
+++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
@@ -652,35 +652,6 @@ _MF_SINGLTN(_PFX_UTIL + "_Dom", Object, /** @lends myfaces._impl._util._Dom.prot
}
},
- isFunctionNative: function(func) {
- return /^\s*function[^{]+{\s*\[native code\]\s*}\s*$/.test(String(func));
- },
-
- detectAttributes: function(element) {
- //test if 'hasAttribute' method is present and its native code is intact
- //for example, Prototype can add its own implementation if missing
- if (element.hasAttribute && this.isFunctionNative(element.hasAttribute)) {
- return function(name) {
- return element.hasAttribute(name);
- }
- } else {
- try {
- //when accessing .getAttribute method without arguments does not throw an error then the method is not available
- element.getAttribute;
-
- var html = element.outerHTML;
- var startTag = html.match(/^<[^>]*>/)[0];
- return function(name) {
- return startTag.indexOf(name + '=') > -1;
- }
- } catch (ex) {
- return function(name) {
- return element.getAttribute(name);
- }
- }
- }
- },
-
/**
* detaches a set of nodes from their parent elements
* in a browser independend manner