1
0
forked from 0ad/0ad
0ad/binaries/data/mods/_test.sim/simulation/components/test-entityid.js
Ykkrosh bd3bd084c0 Support new SpiderMonkey API.
wposix: Define int8_t compatibly with SpiderMonkey.
Remove unused camera, lightenv JS interfaces.
Remove most of vector JS interface.
Remove some of the redundant JS string conversion functions.
Remove unneeded vmem, _lodBias functions.
Clean up some formatting.

This was SVN commit r8629.
2010-11-16 23:00:52 +00:00

19 lines
394 B
JavaScript

function TestScript1A() {}
TestScript1A.prototype.GetX = function() {
// Test that .entity is readonly
try {
delete this.entity;
Engine.TS_FAIL("Missed exception");
} catch (e) { }
try {
this.entity = -1;
Engine.TS_FAIL("Missed exception");
} catch (e) { }
// and return the value
return this.entity;
};
Engine.RegisterComponentType(IID_Test1, "TestScript1A", TestScript1A);