Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
Since February 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
メモ: この機能はウェブワーカー内で利用可能です。
toJSON() は TrustedHTML インターフェイスのメソッドで、格納されているデータの JSON 表現を返します。
なし。
文字列で、格納されているデータの JSON 表現が入ります。
定数 escaped は、信頼型ポリシー escapeHTMLPolicy によって作成されたオブジェクトです。 toString() メソッドは、文書に安全に挿入できる文字列を返します。
| Trusted Types # dom-trustedhtml-tojson |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年10月13日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.