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/08/28 12:56:37 UTC
[myfaces] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/master by this push:
new 50b96fb MYFACES-4291: 2 duplicate functions in _Dom.js
new 05d7a3c Merge remote-tracking branch 'origin/master'
50b96fb is described below
commit 50b96fb73e5c15bc03734388a7fbca5ca13c71f4
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 4521e59..53a4aa5 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
@@ -643,35 +643,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