From b8a25d176227004f5393982e55f7efca2715b935 Mon Sep 17 00:00:00 2001 From: Laurens Nienhaus Date: Sat, 14 Apr 2012 15:22:50 +0200 Subject: [PATCH] use optional data-attributes on textarea for status and statusText --- jquery.iframe-transport.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jquery.iframe-transport.js b/jquery.iframe-transport.js index 211f568..9d69072 100644 --- a/jquery.iframe-transport.js +++ b/jquery.iframe-transport.js @@ -183,6 +183,8 @@ root = doc.documentElement ? doc.documentElement : doc.body, textarea = root.getElementsByTagName("textarea")[0], type = textarea ? textarea.getAttribute("data-type") : null, + status = textarea ? textarea.getAttribute("data-status") : 200, + statusText = textarea ? textarea.getAttribute("data-statusText") : "OK", content = { html: root.innerHTML, text: type ? @@ -190,7 +192,7 @@ root ? (root.textContent || root.innerText) : null }; cleanUp(); - completeCallback(200, "OK", content, type ? + completeCallback(status, statusText, content, type ? ("Content-Type: " + type) : null); });