The ReaScript documentation on reaper.fm has not been updated since v5.0. Use the one generated by your local REAPER installation via the action
ReaScript: Open ReaScript documentation (html) (also in the default Help menu) instead. It's always up to date and it also includes documentation for functions added by currently loaded extensions (such as SWS). X-Raym also made a prettier and searchable version of the docs
here which he updates frequently.