1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
Commit Graph

61 Commits

Author SHA1 Message Date
R. Aidan Campbell
4617108200
fix: example to clean up watchdog goroutine (#431)
Fix the example to clean up watchdog goroutine after either the timeout or the VM completes.

Co-authored-by: Steven Hartland <steven.hartland@multiplay.co.uk>
2022-11-29 00:08:50 +00:00
carterjones
6c383dd335 fix whitespace issues (#297) 2018-03-05 04:20:45 +00:00
Kazuhiro Kubota
5caa170cde Fix typo 2017-01-18 17:37:52 +09:00
Conrad Pankoff
d5ddea59ff Merge pull request #211 from yohanbelleguic/fix-example
readme: fix "twoPlus" example function
2016-10-04 23:45:46 +11:00
Andy Hochhaus
29f673c4d2 Document that otto targets ES5 2016-09-18 17:59:18 -07:00
Yohan BELLEGUIC
51bbfc0656 readme: fix "twoPlus" example function 2016-08-10 14:37:35 +02:00
Slavomir
5bd804b3a8 Add missing code highlighting 2016-07-28 22:02:30 +02:00
kazhuravlev
2bebd7b731 Fix example 2016-01-29 14:15:00 +03:00
Lorenz Leutgeb
aa1f243099 Fix README: s/windows/window/ 2015-04-11 19:51:25 +02:00
Robert Krimen
e6768252c2 Improve error reporting
* Delay entering global scope on code evaluation, not runtime creation

This fixes #66
2014-06-12 21:27:32 -07:00
Robert Krimen
1a2fa0b815 Fix "Halting Problem" example
As discussed in #71, the original example contains a race condition that could cause the goroutine to block forever.
2014-05-31 13:38:11 -07:00
Robert Krimen
f09ce5eac2 Add mutex locking for .Copy() 2014-05-30 20:27:30 -07:00
Robert Krimen
918abeb8d8 The zero value of Value is now defined to be undefined
Previously, it was a publically accessible but invalid value (valueEmpty).

* Deprecate internal use of UndefinedValue(), NullValue(), FalseValue(), TrueValue()
* Guard against Empty, Result, Reference values from escaping the package
2014-05-28 21:23:32 -07:00
Robert Krimen
6d506b4b2f Update documention to mention natto 2014-04-26 22:49:27 -07:00
Robert Krimen
bf7b16f4a3 Add internal compilation step
* Streamline what we get from "otto/parser"
* Get rid of some "otto/parser" cruft
* FunctionExpression => FunctionLiteral
* The debugger statement (debugger) should do nothing (not panic)
* Fix aspects of function expression call evaluation
2014-04-19 14:05:51 -07:00
Robert Krimen
8aca2c886a Disable script marshalling/unmarshalling for now 2014-04-15 18:34:24 -07:00
Robert Krimen
142951ac5a Add Script marshalling/unmarshalling 2014-04-13 19:47:23 -07:00
Robert Krimen
7721396b67 Fix Date tests to always mock UTC 2014-04-13 15:07:29 -07:00
Robert Krimen
ddca88af9b Add compilation (Script, vm.Compile, etc.) 2014-04-13 15:04:32 -07:00
Robert Krimen
ba4c8b0769 Fix documentation 2014-04-11 18:23:34 -07:00
Robert Krimen
f04cfab02d Add ability to parse []byte, *bytes.Buffer, io.Reader 2014-04-11 18:07:57 -07:00
Robert Krimen
ad8a97c028 New parser
* Faster, more straightforward, etc.
* More advanced object literals (get ..., set ...)
* More tests using JavaScript from the wild (http://cdnjs.com/)
2014-04-10 20:42:25 -07:00
Robert Krimen
ec106f69e0 Add Object.Keys()
This fixes #62
2014-04-03 18:25:53 -07:00
Robert Krimen
f0159cfec0 Add note about setTimeout/setInterval
This involves #53
2014-02-01 16:52:57 -08:00
Robert Krimen
096cd7e450 Add ability to interrupt the runtime
This fixes #12, #35
2014-02-01 15:49:17 -08:00
Robert Krimen
8cd34bce0a Fix groups.google.com link 2014-02-01 12:05:08 -08:00
Robert Krimen
4fc2e41b28 Add link to godoc.org
This fixes #52
2014-02-01 12:01:52 -08:00
Robert Krimen
4c1bc5857b Fix documentation (nikai3d)
This fixes #45

The errors are manifest in the README, but this is automatically generated from the go documentation, so we have to fix them at the source
2014-01-19 10:52:14 -08:00
Robert Krimen
ea621687a4 Add Otto.Copy() 2013-07-14 14:20:01 -07:00
Robert Krimen
40d01ced6e Add Array.reduceRight (sdgoij) 2013-06-23 15:29:33 +02:00
Robert Krimen
d42dcb705e Fix documentation
This fixes #26
2013-06-09 18:58:24 -07:00
Robert Krimen
10bb73298b Edit documentation 2013-05-19 23:03:45 -07:00
Robert Krimen
83c56dd73d Add Otto.Call 2013-05-19 19:03:05 -07:00
Robert Krimen
791a2c0c8e Add FunctionCall.Otto 2013-05-19 14:57:01 -07:00
Robert Krimen
0b8a079525 Remove FunctionCall.Run 2013-05-19 14:56:41 -07:00
Robert Krimen
cced87b8e6 Add FunctionCall.Run 2013-05-18 16:24:55 -07:00
Robert Krimen
adf21d0208 No rush to change the interface of Value.Export() 2013-05-15 19:30:39 -07:00
Robert Krimen
faaed09553 Change Export() to have new interface and slightly different behavior 2013-05-15 19:04:39 -07:00
Robert Krimen
7b0eac16f9 Add Number.toPrecision 2013-03-07 08:42:48 -08:00
Robert Krimen
e5f0da1420 Add Number.toExponential 2013-03-07 08:34:12 -08:00
Robert Krimen
2e7e3e17fd Add Number.toFixed 2013-03-07 08:22:23 -08:00
Robert Krimen
795cc4935d Add remarks about ToValue & Otto.ToValue 2013-02-04 10:41:17 -08:00
Robert Krimen
a879744c20 Add Go <=> JavaScript type interaction
Via reflection for struct, map, and slice/array
Fix #10
2013-02-04 10:31:44 -08:00
Robert Krimen
38f6d71ff2 Remove remarks about UTF-16 incompatibility 2013-01-27 10:29:57 -08:00
Robert Krimen
02385abb6f Fix .test262 panic digest 2012-12-26 16:59:34 -08:00
Robert Krimen
5b38b16e99 Add remark about vertical tab and \s 2012-11-07 16:00:32 -08:00
Robert Krimen
33d9cbf707 Add a few regular expression tests 2012-10-20 15:00:25 -07:00
Robert Krimen
2390419e97 Add backreferencing "test" :( 2012-10-20 13:57:13 -07:00
Robert Krimen
ed98144c35 Remarks on UTF-8/16 2012-10-17 11:54:04 -07:00
Robert Krimen
3dcc92af9b Gauntlet system for test262 (run until failing) 2012-10-16 16:33:38 -07:00