2012-06-11 02:17:30 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
|
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
* Dummy implementation of javascript engine functions.
|
|
|
|
*/
|
|
|
|
|
2012-06-13 22:02:46 +04:00
|
|
|
#include "content/content.h"
|
2013-05-26 01:46:27 +04:00
|
|
|
#include "utils/nsoption.h"
|
2012-06-13 22:02:46 +04:00
|
|
|
|
2012-06-13 21:57:16 +04:00
|
|
|
#include "javascript/js.h"
|
2012-06-11 02:17:30 +04:00
|
|
|
#include "utils/log.h"
|
|
|
|
|
|
|
|
void js_initialise(void)
|
|
|
|
{
|
2012-10-02 16:33:08 +04:00
|
|
|
nsoption_set_bool(enable_javascript, false);
|
2012-06-11 02:17:30 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void js_finalise(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-03-21 21:30:41 +03:00
|
|
|
nserror js_newheap(int timeout, jsheap **heap)
|
2012-06-11 02:17:30 +04:00
|
|
|
{
|
2020-03-21 21:30:41 +03:00
|
|
|
*heap = NULL;
|
2015-08-13 14:23:59 +03:00
|
|
|
return NSERROR_OK;
|
2012-06-11 02:17:30 +04:00
|
|
|
}
|
|
|
|
|
2020-03-21 21:30:41 +03:00
|
|
|
void js_destroyheap(jsheap *heap)
|
2012-06-11 02:17:30 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-03-21 21:30:41 +03:00
|
|
|
nserror js_newthread(jsheap *heap, void *win_priv, void *doc_priv, jsthread **thread)
|
2012-06-11 02:17:30 +04:00
|
|
|
{
|
2020-03-21 21:30:41 +03:00
|
|
|
*thread = NULL;
|
|
|
|
return NSERROR_NOT_IMPLEMENTED;
|
2012-06-11 02:17:30 +04:00
|
|
|
}
|
|
|
|
|
2020-03-22 13:14:00 +03:00
|
|
|
nserror js_closethread(jsthread *thread)
|
|
|
|
{
|
|
|
|
return NSERROR_OK;
|
|
|
|
}
|
|
|
|
|
2020-03-21 21:57:57 +03:00
|
|
|
void js_destroythread(jsthread *thread)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-03-21 21:30:41 +03:00
|
|
|
bool js_exec(jsthread *thread, const uint8_t *txt, size_t txtlen, const char *name)
|
2012-06-11 02:17:30 +04:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2012-11-28 22:07:36 +04:00
|
|
|
|
2020-03-21 21:30:41 +03:00
|
|
|
bool js_fire_event(jsthread *thread, const char *type, struct dom_document *doc, struct dom_node *target)
|
2012-11-28 22:07:36 +04:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2015-10-31 16:52:37 +03:00
|
|
|
|
2020-03-21 21:30:41 +03:00
|
|
|
void js_handle_new_element(jsthread *thread, struct dom_element *node)
|
2015-10-31 16:52:37 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-03-21 21:30:41 +03:00
|
|
|
void js_event_cleanup(jsthread *thread, struct dom_event *evt)
|
2015-10-31 16:52:37 +03:00
|
|
|
{
|
|
|
|
}
|