trisquel-icecat/icecat/js/xpconnect/tests/chrome/file_expandosharing.js
2025-10-06 02:35:48 -06:00

10 lines
338 B
JavaScript

function checkFromESM(target, is_op) {
is_op(target.numProp, 42, "Number expando works");
is_op(target.strProp, "foo", "String expando works");
// If is_op is todo_is, target.objProp will be undefined.
try {
is_op(target.objProp.bar, "baz", "Object expando works");
} catch (e) {
is_op(0, 1, "No object expando");
}
}