Chrome Canary 18.0.976.0でも「XMLHttpRequest.responseType = ‘document’;」によりXMLHttpRequest.responseからHTMLDocumentオブジェクトを得られるようになった
Firefox 11ではXMLHttpRequestでの処理の際に「XMLHttpRequest.responseType = ‘document’;」のように記述すると、XMLHttpRequest.responseやXMLHttpRequest.responseXMLから、HTMLDocumentオブジェクトを得られるようになっている(XMLHttpRequest.responseTextからの取得はエラーが表示される)。
Nightly の XMLHttpRequest で text/html がパース可能に! - hogehoge @teramako
Chrome Canary 18.0.976.0でもこれが可能となっている事を確認した。
XMLHttpRequest.responseXML now supports HTML documents.
Reversed Lists, Animatable Filters, CSS Shaders and secure SSL « Peter Beverloo
/*jslint devel: true, browser: true, maxerr: 50, maxlen: 80, indent: 4*/
// Edition 2011-12-09
(function executeXMLHttpRequest(win) {
'use strict';
var xhr;
xhr = new win.XMLHttpRequest();
xhr.onload = function logXMLHttpRequestProgressEvent(evt) {
console.log(evt);
};
xhr.open('GET', win.location.href, true);
xhr.responseType = 'document';
xhr.send(null);
}(window));

javascript chrome
|
10 notes (#)
|
Comments
|
11/12/21 Wed 18:04:01
($)
|
author:syoichi
e-mail:tsuyuhara-syoichi@hotmail.co.jp
author:syoichi
e-mail:tsuyuhara-syoichi@hotmail.co.jp
