--- title: Boolean.prototype.toSource() slug: Web/JavaScript/Reference/Global_Objects/Boolean/toSource tags: - Boolean - Deprecated - JavaScript - Method - Non-standard - Obsolete - Prototype translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/toSource ---
{{JSRef}} {{deprecated_header}}

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

構文

booleanObj.toSource()
	Boolean.toSource()

返値

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

ネイティブ関数

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

function Boolean() {
    [native code]
}

仕様書

いずれの標準仕様にも組み込まれていません。

ブラウザーの互換性

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

関連情報