Does existance of ActiveXObject in Opera 7.6x break your code?

M

Martin Honnen

Opera 7.60 is currently available as a preview release, see the announcement
http://my.opera.com/forums/showthread.php?s=88e04bd312e9a2c430c6d7b0386215d0&threadid=65041
One of the new features as listed on
http://snapshot.opera.com/windows/w760p1.html#important
is an implementation of XMLHttpRequest to try to be interoperable with
Mozilla/Netscape's implementation of XMLHttpRequest.
What the page doesn't list but what the thread
http://groups.google.com/[email protected]&lr=&hl=en
brought up is that Opera 7.60 preview also implements the global
function named
ActiveXObject
which was so far only available in MSIE/Windows. While with IE that
function allows you to instantiate abritrary ActiveX objects (with
new ActiveXObject('program.id');
) its sole purpose in Opera so far seems to allow to instantiate
XMLHttpRequest as
new ActiveXObject('Msxml2.XMLHTTP')
that is the usual MSIE 6/JScript way of getting an XMLHTTP request object.
However some people might use the existance of the function
ActiveXObject as an indicator that their script is dealing with
IE/Windows and such scripts will/could break if coming Opera 7.6x do
have that global function too.
So what do you think, should Opera implement that global function named
ActiveXObject or does that break your code? You can raise your concerns
in the Opera newsgroup opera.tech on news.opera.com in the thread named
above.

In my view it seems sufficient if Opera 7.60 implements the
XMLHttpRequest function as Mozilla/Netscape do, people currently doing
cross platform HTTP request should have a
if (typeof XMLHttpRequest != 'undefined') {
var httpRequest = new XMLHttpRequest();
...
}
branch anyway in their code for Mozilla (and perhaps Safari) so that
code would then work unchanged.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top