When we read the rbXPCOM documentation, we can read : "In xpidl, size_is attribute is used to specify the size of array or non-zero terminated string(wstring). In Ruby, explicitly passing or receiving the size of these objects are redundant, because objects know their size. To remove this redundancy, rbXPCOM hides the size parameters from Ruby code."
But on javascript the size_is attribute is also redundant (array.length), why we don't hide this attribute in javascript ? IDL : void test( in PRUint32 i_size, [array, size_is(i_size)] in PRInt16 i); Javascript : var array=["hello","hi","salut"]; wrong way : toto.test(array); right way : toto.test(array.length,array); Thanks ! _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
