| 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 4 | |
| 5 | package com.netscape.javascript.qa.liveconnect; |
| 6 | |
| 7 | import netscape.javascript.JSObject; |
| 8 | |
| 9 | |
| 10 | /** |
| 11 | * Class with one static method that exercises JSObject.eval with |
| 12 | * any JSObject and any JS code. Used by tests in |
| 13 | * ns/js/tests/lc3/exceptions |
| 14 | * |
| 15 | * |
| 16 | */ |
| 17 | public class JSObjectEval { |
| 18 | /** |
| 19 | * Given a JSObject and some JavaScript code, have the object |
| 20 | * evaluate the JavaScript code. |
| 21 | * |
| 22 | */ |
| 23 | public static Object eval(JSObject obj, String code) { |
| 24 | obj.eval(code); |
| 25 | return null; |
| 26 | } |
| 27 | } |