--- 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 --- <div>{{JSRef}} {{deprecated_header}}</div> <p><code><strong>toSource()</strong></code> メソッドは、オブジェクトのソースコードを表す文字列を返します。</p> <h2 id="Syntax">構文</h2> <pre class="brush: js"><var>booleanObj</var>.toSource() Boolean.toSource()</pre> <h3 id="Return_value">返値</h3> <p>オブジェクトのソースコードを表す文字列です。</p> <h2 id="Examples">例</h2> <h3 id="Native_function">ネイティブ関数</h3> <p>組み込みの {{jsxref("Boolean")}} オブジェクトでは、 <code>toSource</code> はソースコードが利用できないことを示す以下の文字列を返します。</p> <pre class="brush: js">function Boolean() { [native code] } </pre> <h2 id="Specifications">仕様書</h2> <p>いずれの標準仕様にも組み込まれていません。</p> <h2 id="Browser_compatibility">ブラウザーの互換性</h2> <p>{{Compat("javascript.builtins.Boolean.toSource")}}</p> <h2 id="See_also">関連情報</h2> <ul> <li>{{jsxref("Object.prototype.toSource()")}}</li> </ul>