siberia-man
12-25-2010, 02:29 PM
I have encountered unpleasant thing.
var htmlfile = new ActiveXObject('htmlfile');
var window = htmlfile.parentWindow;
var document = window.document;
var tag = document.createElement('textarea');
tag.innerHTML = 'any non-empty string';
The example above in JScript environment throws the following exception htmlfile: Catastrophic failure
Any script (JS or VBS) is down when assign the 'innerHTML' property of tags. In these examples I create the TEXTAREA tag but it does not matter. This don't work for ALL block or inline tags. Nevertheless an assignment of the 'innerHTML' property in browsers works fine (see the second example).
var tag = document.createElement('textarea');
tag.innerHTML = 'any non-empty string';
I have a question. Is this known bug or feature of the 'htmlfile' object? Or maybe someone of you has encountered this?
var htmlfile = new ActiveXObject('htmlfile');
var window = htmlfile.parentWindow;
var document = window.document;
var tag = document.createElement('textarea');
tag.innerHTML = 'any non-empty string';
The example above in JScript environment throws the following exception htmlfile: Catastrophic failure
Any script (JS or VBS) is down when assign the 'innerHTML' property of tags. In these examples I create the TEXTAREA tag but it does not matter. This don't work for ALL block or inline tags. Nevertheless an assignment of the 'innerHTML' property in browsers works fine (see the second example).
var tag = document.createElement('textarea');
tag.innerHTML = 'any non-empty string';
I have a question. Is this known bug or feature of the 'htmlfile' object? Or maybe someone of you has encountered this?