aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 129ee3bc7..398db35d8 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -583,6 +583,21 @@ js_object_get_property_as_object (JSContextRef js_context,
}
static char *
+js_get_element_property (JSContextRef js_context,
+ JSObjectRef object,
+ const char *prop)
+{
+ JSValueRef val;
+ char *buffer = NULL;
+
+ val = js_object_get_property (js_context, object, prop);
+ if (JSValueIsString (js_context, val))
+ buffer = js_value_to_string (js_context, val);
+
+ return buffer;
+}
+
+static char *
js_get_element_attribute (JSContextRef js_context,
JSObjectRef object,
const char *attr)