mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
LibWeb: Don't expose XMLHttpRequest.responseXML
in workers
This commit is contained in:
parent
07231e74c7
commit
7724a96efa
Notes:
github-actions[bot]
2025-06-30 23:05:26 +00:00
Author: https://github.com/tcl3
Commit: 7724a96efa
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5254
Reviewed-by: https://github.com/gmta ✅
4 changed files with 19 additions and 1 deletions
|
@ -50,6 +50,6 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||||
attribute XMLHttpRequestResponseType responseType;
|
attribute XMLHttpRequestResponseType responseType;
|
||||||
readonly attribute any response;
|
readonly attribute any response;
|
||||||
readonly attribute DOMString responseText;
|
readonly attribute DOMString responseText;
|
||||||
readonly attribute Document? responseXML;
|
[Exposed=Window] readonly attribute Document? responseXML;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
PASS
|
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<script src="../include.js"></script>
|
||||||
|
<script>
|
||||||
|
asyncTest(done => {
|
||||||
|
let work = new Worker("XHttpRequest-responseXML-unavailable-in-worker.js");
|
||||||
|
work.onmessage = (evt) => {
|
||||||
|
println(evt.data);
|
||||||
|
done();
|
||||||
|
};
|
||||||
|
work.postMessage("")
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -0,0 +1,5 @@
|
||||||
|
self.onmessage = function () {
|
||||||
|
let xhr = new XMLHttpRequest();
|
||||||
|
postMessage(xhr.responseXML === undefined ? "PASS" : "FAIL");
|
||||||
|
self.close();
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue