Commit Graph

13 Commits

Author SHA1 Message Date
Scott Kyle 2e592bc101 Sprinkle some const inside ES6 JS code
React Native 0.13.0 fixes the bug we experienced by using const.
2015-10-21 13:57:34 -07:00
Scott Kyle 0055d0510c Make List objects work with Object.keys in Chrome
Rather than using Object.preventExtensions to throw exceptions when setting any out-of-bounds index, we must instead compromise by only throwing for the common cases, which are -1 and list.length. Having Object.keys() support is essential for List to work with React Native ListViewDataSource.

Resolves #80
2015-10-21 13:11:41 -07:00
Scott Kyle 01dc3a85d9 Add comment about usage of preventExtensions 2015-10-20 00:52:38 -07:00
Scott Kyle f2c4e7882a Make RPC lists non-extensible
Assigning to non-existent index will throw an exception and all tests pass in Chrome!
2015-10-19 17:43:51 -07:00
Scott Kyle b07aa72a55 Move all constants into a single JS file 2015-10-19 16:19:43 -07:00
Scott Kyle 1b7653206a Generalize getting/setting properties through RPC 2015-10-19 15:46:00 -07:00
Scott Kyle 4c0cc578d5 Generalize calling methods through the RPC 2015-10-19 12:46:31 -07:00
Scott Kyle a997ec5be9 Some cleanup of JS 2015-10-08 15:32:14 -07:00
Scott Kyle 31fc14d602 Support (de)serialization of objects in RPC
Everything is a dictionary with either a `value` key or an `id` key. If it's a value, then it will recursively be (de)serialized.
2015-10-08 01:53:01 -07:00
Scott Kyle a9cac20f79 Rework lists to each have their own getters
This was necessary for them to each have their own enumerable properties. The React Native ListViewDataSource uses Object.keys() to the indexes.
2015-10-07 21:20:14 -07:00
Scott Kyle 41ba3b62b8 JS implementation for Results from RPC 2015-10-07 17:08:31 -07:00
Ari Lazier 476b3623bb partial rpc server implemenation 2015-10-06 13:36:56 -06:00
Scott Kyle bf1ecfbb07 Initial concept of JS for Chrome debugging
The idea is that we will have an NPM module that should always be required to use the Realm JS API. It will handle the underlying implementation details depending on which environment it is being run in (i.e. JavaScriptCore, Chrome, Node).

The focus here was on stubbing out the machinery required to get React Native Chrome debugging working with the Realm API by leveraging synchronous requests. The app itself will need to run a web server that responds to these requests.
2015-10-01 22:56:47 -07:00