You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2019/05/15 21:24:49 UTC
[wicket] 09/16: WICKET-6667 JS remove IE quirks support
htmlToDomDocument()
This is an automated email from the ASF dual-hosted git repository.
svenmeier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
commit dcf10415169635fc451945f851aec9f24ff607ce
Author: Sven Meier <sv...@apache.org>
AuthorDate: Wed May 8 10:42:55 2019 +0200
WICKET-6667 JS remove IE quirks support htmlToDomDocument()
---
.../apache/wicket/ajax/res/js/wicket-ajax-jquery.js | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index 66319bf..401468d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -39,7 +39,6 @@
var getAjaxBaseUrl,
isUndef,
replaceAll,
- htmlToDomDocument,
nodeListToArray;
isUndef = function (target) {
@@ -63,20 +62,6 @@
};
/**
- * Helper method that serializes HtmlDocument to string and then
- * creates a DOMDocument by parsing this string.
- * It is used as a workaround for the problem described at https://issues.apache.org/jira/browse/WICKET-4332
- * @param htmlDocument (DispHtmlDocument) the document object created by IE from the XML response in the iframe
- */
- htmlToDomDocument = function (htmlDocument) {
- var xmlAsString = htmlDocument.body.outerText;
- xmlAsString = xmlAsString.replace(/^\s+|\s+$/g, ''); // trim
- xmlAsString = xmlAsString.replace(/(\n|\r)-*/g, ''); // remove '\r\n-'. The dash is optional.
- var xmldoc = Wicket.Xml.parse(xmlAsString);
- return xmldoc;
- };
-
- /**
* Converts a NodeList to an Array
*
* @param nodeList The NodeList to convert
@@ -843,11 +828,6 @@
try {
var root = envelope.getElementsByTagName("ajax-response")[0];
- if (isUndef(root) && envelope.compatMode === 'BackCompat') {
- envelope = htmlToDomDocument(envelope);
- root = envelope.getElementsByTagName("ajax-response")[0];
- }
-
// the root element must be <ajax-response
if (isUndef(root) || root.tagName !== "ajax-response") {
this.failure(context, null, "Could not find root <ajax-response> element", null);