「Editor.OpenFile()のポリフィル」の版間の差分
細編集の要約なし |
SyntaxHighlightにcopyの追加 |
||
| (2人の利用者による、間の2版が非表示) | |||
| 1行目: | 1行目: | ||
Editor.OpenFile()は開いたDocumentオブジェクトを返さないので、Documentオブジェクトを返すようにするポリフィルです。Editor.OpenFile()が開いたDocumentオブジェクトを返すようになるまでは使えます。 | Editor.OpenFile()は開いたDocumentオブジェクトを返さないので、Documentオブジェクトを返すようにするポリフィルです。Editor.OpenFile()が開いたDocumentオブジェクトを返すようになるまでは使えます。 | ||
<syntaxhighlight lang="javascript" copy> | |||
< | |||
function OpenFile(file, encoding, flags){ | function OpenFile(file, encoding, flags){ | ||
var i, j, e, d; | var i, j, e, d; | ||
file = new ActiveXObject("Scripting.FileSystemObject").GetAbsolutePathName(file); | |||
window.Editor.OpenFile(file, encoding, flags); | window.Editor.OpenFile(file, encoding, flags); | ||
for(i = 0; i < window.Editors.Count; i++){ | for(i = 0; i < window.Editors.Count; i++){ | ||
| 19行目: | 18行目: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
スポンサーリンク