document.body['onload'] property disappear randomly
Reported by
xiexingy...@gmail.com,
Sep 1 2016
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Steps to reproduce the problem:
1. my page have 1 main page and 2 iframe subpage;
2. load the main page
3. load the iframe subpage, and on the end of subpage , my JS code try to rewrite the document.body['onload'] =Function(new_codes);
What is the expected behavior?
document.body.onload is function anonymous { new_codes } ; and my_codes can be executed;
What went wrong?
in console , I see the document.body.onload is undefined, but my new_codes can be executed randomly.
it looks like the document.body.onload property have been memory release before it execute
Did this work before? No
Chrome version: 52.0.2743.116 Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0
I use 3 ways to workaround the bug :
1. use the firefox and safari
2. use the element.setAttribute("onload", new_code) to replace the element['onload'] = Function(body);
3.add a new useless property : element['._myonload'] = element['onload'];
,
Sep 5 2016
this origin html page; 2016-09-05 7:36 GMT+08:00 tk… via monorail < monorail+v2.567034358@chromium.org>:
,
Sep 5 2016
Unfortunately , this page is the netgear 8500 router's manage page, it can't work if it is out of the router. 2016-09-05 15:40 GMT+08:00 谢兴勇 <xiexingyong@gmail.com>:
,
Sep 5 2016
You wrote "my JS code try to rewrite...". So I assume you can get/modify the source code of the page. Can you make a minimum reproduction independent from the router? Anyway, this issue looks to be in Binding area.
,
Sep 12 2016
Thank you for providing more feedback. Adding requester "tkent@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 12 2016
,
Mar 13 2017
Cleaning up "Needs-Review" label as we are not using this label for triage anymore. Ref bug for this cleanup 684919
,
Apr 13 2017
Does this issue still reproduce in a recent version of Chrome (ideally current Chrome Canary)? We've shipped some changes to how lifetime of these objects is managed in the meantime, and it seems likely that it may have affected this.
,
May 8 2017
Unable to reproduce; reporter cannot confirm that this still occurs. Lacking any path forward, WontFix. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by tkent@chromium.org
, Sep 4 2016Labels: Needs-Feedback