Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
  3.  *
  4.  * This file is part of NetSurf, http://www.netsurf-browser.org/
  5.  *
  6.  * NetSurf is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; version 2 of the License.
  9.  *
  10.  * NetSurf is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17.  */
  18.  
  19. /** \file
  20.  * Dummy implementation of javascript engine functions.
  21.  */
  22.  
  23. #include "content/content.h"
  24. #include "desktop/options.h"
  25.  
  26. #include "javascript/js.h"
  27. #include "utils/log.h"
  28.  
  29. void js_initialise(void)
  30. {
  31.         nsoption_set_bool(enable_javascript, false);
  32. }
  33.  
  34. void js_finalise(void)
  35. {
  36. }
  37.  
  38. jscontext *js_newcontext(void)
  39. {
  40.         return NULL;
  41. }
  42.  
  43. void js_destroycontext(jscontext *ctx)
  44. {
  45. }
  46.  
  47. jsobject *js_newcompartment(jscontext *ctx, void *win_priv, void *doc_priv)
  48. {
  49.         return NULL;
  50. }
  51.  
  52. bool js_exec(jscontext *ctx, const char *txt, size_t txtlen)
  53. {
  54.         return true;
  55. }
  56.  
  57. bool js_fire_event(jscontext *ctx, const char *type, struct dom_document *doc, struct dom_node *target)
  58. {
  59.         return true;
  60. }
  61.