Issue metadata
Sign in to add a comment
|
Dynamically created properties of the 'Script' DOM objects are removed after an ASP.NET callbacks
Reported by
vladimir...@devexpress.com,
Apr 7 2017
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
Steps to reproduce the problem:
Hi,
After upgrading Google Chrome to version 57, we've noticed an issue that appears after callbacks in ASP.NET applications.
In our web components we obtain JavaScript blocks from DOM in the following manner:
var resultScripts = [];
var scripts = document.getElementsByTagName("SCRIPT");
for(var i = 0; i < scripts.length; i++) {
if(scripts[i].id.indexOf(prefix) == 0)
resultScripts.push(scripts[i]);
}
This code is executed in the ‘windows.load’ JavaScript event handler. As you can see, we persist all the script objects into an array. Then every JavaScript block is executed using the ‘eval’ JavaScript function. Once a block has been executed, an additional property ‘executed=true’ is assigned to the JS object in the array:
for(var i = 0; i < resultScripts.length; i++){
if(!resultScripts [i].executed) {
eval(resultScripts [i].text);
resultScripts[i].executed = true;
}
}
We use the WebForm_DoCallback JS function (http://stackoverflow.com/questions/2977321/webform-docallback-definition) to send callbacks to the server. This function is automatically generated by the ASP.NET server. After the callback returns, we add new script blocks to the array, then iterate through the array and check every item for having the ‘executed=true’ property. New script objects do not have this property and they are executed. Old script blocks have this property and they are not executed any more.
This worked well prior to v57 Google Chrome. However, after an upgrade to version 57 we've noticed that all ‘old’ script objects in the array lose the ‘executed’ property after a callback. As a result, the scripts are executed again and this breaks the web page's functionality.
This issue occurs only in the Goggle Chrome browser and only starting with version 57. All other browsers as well as previous versions work well. We are ready to provide you with a runnable sample project, but it is based on ASP.NET.
Vladimir Frizen
DevExpress Support Team
http://www.devexpress.com
What is the expected behavior?
Properties of the 'Script' DOM objects that was assigned before an ASP.NET callbacks are kept after the callback.
What went wrong?
Properties of the 'Script' DOM objects that was assigned before an ASP.NET callbacks are removed after the callback.
Did this work before? Yes 56
Chrome version: 57.0.2987.133 Channel: stable
OS Version: 6.3
Flash Version: Shockwave Flash 25.0 r0
Would you please specify what changes were made in version 57 Google Chrome? Do you have any plans to roll back this behavior? I would also appreciate it if you provide us with any recommendation regarding this issue.
,
Apr 11 2017
,
Apr 12 2017
Sounds like the exact same problem as mentioned in 702490. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ranjitkan@chromium.org
, Apr 7 2017