From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/api/url/tojson/index.html | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/ko/web/api/url/tojson/index.html (limited to 'files/ko/web/api/url/tojson/index.html') diff --git a/files/ko/web/api/url/tojson/index.html b/files/ko/web/api/url/tojson/index.html new file mode 100644 index 0000000000..f5fbf7a972 --- /dev/null +++ b/files/ko/web/api/url/tojson/index.html @@ -0,0 +1,52 @@ +--- +title: URL.toJSON() +slug: Web/API/URL/toJSON +tags: + - API + - Method + - Reference + - URL + - URL API +translation_of: Web/API/URL/toJSON +--- +
{{APIRef("URL API")}}
+ +

{{domxref("URL")}} 인터페이스의 toJSON() 메서드는 URL을 직렬화한 {{domxref("USVString")}}을 반환합니다. 그러나, 사실상 {{domxref("URL.toString", "toString()")}}과 같습니다..

+ +

{{AvailableInWorkers}}

+ +

구문

+ +
const href = url.toJSON()
+ +

반환 값

+ +

{{domxref("USVString")}}.

+ +

예제

+ +
const url = new URL("https://developer.mozilla.org/en-US/docs/Web/API/URL/toString");
+url.toJSON(); // should return the URL as a string
+ +

명세

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('URL', '#dom-url-tojson', 'toJSON()')}}{{Spec2('URL')}}Initial definition.
+ +

브라우저 호환성

+ + + +

{{Compat("api.URL.toJSON")}}

-- cgit v1.2.3-54-g00ecf