概要
document.designMode は、document 全体を編集可能にするかどうかを制御します。セットできる値は、"on" と "off" のどちらかです。仕様書では、このプロパティの値はデフォルトで "off" です。Firefox はこの標準仕様に従います。Chrome や IE の最近のバージョンでは、デフォルトで "inherit" です。IE6~10 では、値が大文字です。
構文
var mode = document.designMode; document.designMode = "on"; document.designMode = "off";
例
<iframe> のドキュメントを編集可能にします:
iframe_node.contentDocument.designMode = "on";
仕様書
| 仕様 | 状態 | コメント |
|---|---|---|
| WHATWG HTML Living Standard The definition of 'designMode' in that specification. |
Living Standard | Initial definition. |
ブラウザの互換性
| 機能 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| 基本サポート | (有) | (有) | (有) | (有) | (有) |
| 機能 | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| 基本サポート | ? | ? | ? | ? | ? | ? |