forked from 0ad/0ad
Ykkrosh
bd3bd084c0
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.
19 lines
394 B
JavaScript
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);
|