Hi,
I am encountering an issue with the isA.Array implementation in Smartclient (8.3 recent build).
Some background: we have code in an iframe which calls its parent/top. We load the SC libraries in the parent html page. So the iframe does not load the sc libraries directly. We use this to load a google map in an iframe without having all sc code to load in the iframe (we want to have access to the global context from the iframe).
This scenario the isA.Array works incorrectly. The isA.Array implementation checks some native things it seems. This works fine in case of the main window but not if run from an iframe. The reason is that the array is created in the iframe and the array type in the iframe is not augmented by Smartclient (see the example pages attached). So therefore Smartclient does not detect/see the array as an array.
If I compare the isA.Array implementation to implementations by other solutions ([1] see below) then this is different from what others do. For me this 'other' implementation would work fine and seems to be more like 'the common' approach.
I have attached an example test cases, it needs to be run in web server and the paths to the ISC libraries have to be repaired, but you will see this fail in the console.
Note this fails in chrome 18 but not in other browsers.
gr. Martin
[1]
jQuery:
https://github.com/jquery/jquery/blo...c/core.js#L487
YUI3:
https://github.com/yui/yui3/blob/mas...ui-lang.js#L28
Enyo:
https://github.com/enyojs/enyo/blob/...el/lang.js#L90
I am encountering an issue with the isA.Array implementation in Smartclient (8.3 recent build).
Some background: we have code in an iframe which calls its parent/top. We load the SC libraries in the parent html page. So the iframe does not load the sc libraries directly. We use this to load a google map in an iframe without having all sc code to load in the iframe (we want to have access to the global context from the iframe).
This scenario the isA.Array works incorrectly. The isA.Array implementation checks some native things it seems. This works fine in case of the main window but not if run from an iframe. The reason is that the array is created in the iframe and the array type in the iframe is not augmented by Smartclient (see the example pages attached). So therefore Smartclient does not detect/see the array as an array.
If I compare the isA.Array implementation to implementations by other solutions ([1] see below) then this is different from what others do. For me this 'other' implementation would work fine and seems to be more like 'the common' approach.
I have attached an example test cases, it needs to be run in web server and the paths to the ISC libraries have to be repaired, but you will see this fail in the console.
Note this fails in chrome 18 but not in other browsers.
gr. Martin
[1]
jQuery:
https://github.com/jquery/jquery/blo...c/core.js#L487
YUI3:
https://github.com/yui/yui3/blob/mas...ui-lang.js#L28
Enyo:
https://github.com/enyojs/enyo/blob/...el/lang.js#L90
Comment