Преглед изворни кода

LibWeb: Add a clarifying comment to XHR::m_response_object

Trying to change this to a JS::Object didn't quite work, so let's add
a helpful comment instead.
Linus Groh пре 2 година
родитељ
комит
bfa378660b
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      Userland/Libraries/LibWeb/XHR/XMLHttpRequest.h

+ 1 - 0
Userland/Libraries/LibWeb/XHR/XMLHttpRequest.h

@@ -161,6 +161,7 @@ private:
     // https://xhr.spec.whatwg.org/#response-object
     // response object
     //     An object, failure, or null, initially null.
+    //     NOTE: This needs to be a JS::Value as the JSON response might not actually be an object.
     Variant<JS::Value, Failure, Empty> m_response_object;
 
     // FIXME: https://xhr.spec.whatwg.org/#xmlhttprequest-fetch-controller