From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../global_objects/string/tosource/index.html | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 files/ja/web/javascript/reference/global_objects/string/tosource/index.html (limited to 'files/ja/web/javascript/reference/global_objects/string/tosource') diff --git a/files/ja/web/javascript/reference/global_objects/string/tosource/index.html b/files/ja/web/javascript/reference/global_objects/string/tosource/index.html new file mode 100644 index 0000000000..7c624a8b10 --- /dev/null +++ b/files/ja/web/javascript/reference/global_objects/string/tosource/index.html @@ -0,0 +1,54 @@ +--- +title: String.prototype.toSource() +slug: Web/JavaScript/Reference/Global_Objects/String/toSource +tags: + - JavaScript + - Method + - Non-standard + - Prototype + - Reference + - String +translation_of: Web/JavaScript/Reference/Global_Objects/String/toSource +--- +
{{JSRef}} {{non-standard_header}}
+ +

toSource() はそのオブジェクトのソースコードを表す文字列を返します。

+ +

構文

+ +
String.toSource()
+str.toSource()
+
+ +

戻り値

+ +

呼び出し元のオブジェクトのソースコードを表す文字列です。

+ +

説明

+ +

toSource() メソッドは以下の値を返します。

+ +

組み込み {{jsxref("String")}} オブジェクトでは、toSource() はソースコードが存在しないことを示す以下の文字列を返します。

+ +
function String() {
+   [native code]
+}
+
+ +

{{jsxref("String")}} オブジェクトのインスタンスや、文字列リテラルでは、toSource() はそのソースコードを表す文字列を返します。

+ +

このメソッドは、通常、JavaScript によって内部的に呼ばれ、コード中で明示的に呼ばれることはありません。

+ +

仕様

+ +

あらゆる標準仕様に含まれません。JavaScript 1.3 で実装されています。

+ +

ブラウザー実装状況

+ + + +

{{Compat("javascript.builtins.String.toSource")}}

+ +

参照

+ +

Object.prototype.toSource

-- cgit v1.2.3-54-g00ecf