mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-30 10:13:08 +03:00
1b8f9daa51
Improve robustness of jsobject to libdom object conversion in appendChild
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
/* Binding to generate Text interface
|
|
*
|
|
* Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
|
|
*
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
*
|
|
* Released under the terms of the MIT License,
|
|
* http://www.opensource.org/licenses/mit-license
|
|
*/
|
|
|
|
|
|
webidlfile "html.idl";
|
|
|
|
hdrcomment "Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>";
|
|
hdrcomment "This file is part of NetSurf, http://www.netsurf-browser.org/";
|
|
hdrcomment "Released under the terms of the MIT License,";
|
|
hdrcomment " http://www.opensource.org/licenses/mit-license";
|
|
|
|
preamble %{
|
|
|
|
#include <dom/dom.h>
|
|
|
|
#include "utils/config.h"
|
|
#include "utils/log.h"
|
|
#include "render/html_internal.h"
|
|
#include "javascript/jsapi.h"
|
|
|
|
#include "text.h"
|
|
|
|
%}
|
|
|
|
#include "dom.bnd"
|
|
|
|
binding text {
|
|
type js_libdom; /* the binding type */
|
|
|
|
interface Text; /* Web IDL interface to generate */
|
|
|
|
private "dom_text *" node;
|
|
private "struct html_content *" htmlc;
|
|
}
|
|
|
|
api finalise %{
|
|
if (private != NULL) {
|
|
dom_node_unref(private->node);
|
|
}
|
|
%}
|