Is there a cross-browser standard on-load event for HTML's “object” tag?

前端 未结 3 1452
南方客
南方客 2020-12-05 13:34

I am aware that IE supports the onreadystatechange attribute on the object tag, but this doesn\'t seem to be a standard way thus all other browsers

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 14:11

    The attribute works well in latest versions of Firefox, Chrome and Opera (I've just tested it).

    Also, the expression 'onload' in document.createElement('object') evaluates to true in Chrome and Opera; naturally, Firefox is an exception because such event support check doesn't work there generally. kangax describes cross-browser event support detection at http://perfectionkills.com/detecting-event-support-without-browser-sniffing/

    提交回复
    热议问题