location: toString() メソッド
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2016年7月.
toString()
は Location
インターフェイスの文字列化メソッドであり、URL 全体を文字列で返します。これは Location.href
の読み取り専用版です。