Skip to content
Commit 674b090d authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

luci-base: xhr.js: use JSON.parse() and pass request duration to callbacks



JSON.parse() is supported on all modern browsers and a far better
solution than the hakish and potentially dangerous eval().

Also calculate the duration of request and pass it as 3rd argument to the
callback function, this makes it easier to calculate request delays or
poll intervals in code using XHR.

Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent 0d96655f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment