Dojo IE8 Defect: ‘bases’ is null or not an object

This is a Dojo defect where we get the error “‘bases’ is null or not an object” when trying to do a cross iframe call even if the iframes are from the same domain.

From my case, it was two iframes from the same domain with the child calling its parent’s method. It’s pretty well summarized by the thread reply below.

From the Dojo Toolkit mailing list archive at Nabble.com:

I get this error in IE8 (haven’t tried IE7).
I don’t get this error in Firefox, IE9 (IE9 mode or even in IE8 mode) and
Chrome.

Download the 2 html files attached and place them next to each other.
One basically is the iframe src of the other.

http://dojo-toolkit.33424.n3.nabble.com/file/n2752028/test.html test.html
http://dojo-toolkit.33424.n3.nabble.com/file/n2752028/test1.html test1.html

Press the button to show the dialog.
It will fail in IE8 with the above error.
Workaround is to create the options object in the iframe via
options = top.Object();

Note, the above test might fail in Chrome too with a X-Domain security
violation since the html files have diff urls…but if they were being
served from the same domain then Chrome would be fine too.

View this message in context: http://dojo-toolkit.33424.n3.nabble.com/IE8-bases-is-null-or-not-an-object-tp2752028p2752028.html

 
4
Kudos
 
4
Kudos

Now read this

Using URL.createObjectURL()

This is a blog post about using the Web API URL.createObjectURL(). Here we will go through the use cases as well as the inner intricacies of what this Web API does. First up lets see how to use the API. URL.createObjectURL() # Syntax... Continue →