@@ -204,3 +204,13 @@ xmlHttpRequestGetStatusText xhr = do
204 _ <- jsstringgetutf8cstring'_ j ps (fromIntegral l)
204 _ <- jsstringgetutf8cstring'_ j ps (fromIntegral l)
205 peekCString ps
205 peekCString ps
206 return $ T.pack s
206 return $ T.pack s
208+xmlHttpRequestSetWithCredentials :: XMLHttpRequest -> Bool -> IO ()
209+xmlHttpRequestSetWithCredentials xhr b = do
210+ let c = xhrContext xhr
211+ b' <- jsvaluemakeboolean c b
212+ o <- toJSObject c [xhrValue xhr, b']
213+ script <- jsstringcreatewithutf8cstring "this[0].withCredentials = this[1]"
214+ _ <- jsevaluatescript c script o nullPtr 1 nullPtr