[seed] xml: Add an xml.js extension which will implement things like getElementsByTagName, etc...



commit e5b873cc20187421bc2ccd6020c97ff5748e2960
Author: Robert Carr <racarr svn gnome org>
Date:   Tue May 12 14:52:39 2009 -0400

    xml: Add an xml.js extension which will implement things like getElementsByTagName, etc...
---
 modules/libxml/Makefile.am |    3 +++
 modules/libxml/libxml.c    |    3 +++
 modules/libxml/xml.js      |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/libxml/Makefile.am b/modules/libxml/Makefile.am
index 20c5e8f..b9ebd8d 100644
--- a/modules/libxml/Makefile.am
+++ b/modules/libxml/Makefile.am
@@ -21,6 +21,9 @@ liblibxml_la_LDFLAGS = \
 	$(GOBJECT_INTROSPECTION_LDFLAGS) \
 	$(SEED_PROFILE_LIBS)
 
+extensionsdir=$(datadir)/seed/extensions
+extensions_DATA=xml.js
+
 endif
 
 
diff --git a/modules/libxml/libxml.c b/modules/libxml/libxml.c
index 47c44a7..8ad584d 100644
--- a/modules/libxml/libxml.c
+++ b/modules/libxml/libxml.c
@@ -429,6 +429,8 @@ static void
 seed_libxml_define_stuff ()
 {
   SeedObject xpath_constructor;
+  SeedObject node_proto;
+
   seed_class_definition xml_doc_class_def = seed_empty_class;
   seed_class_definition xml_node_class_def = seed_empty_class;
   seed_class_definition xml_attr_class_def = seed_empty_class;
@@ -469,6 +471,7 @@ seed_libxml_define_stuff ()
 			(SeedFunctionCallback) seed_xml_parse_file,
 			namespace_ref);
   
+  seed_simple_evaluate (eng->context, "imports.extensions.xml", NULL);
 }
 
 SeedObject
diff --git a/modules/libxml/xml.js b/modules/libxml/xml.js
new file mode 100644
index 0000000..2e602e4
--- /dev/null
+++ b/modules/libxml/xml.js
@@ -0,0 +1 @@
+Seed.print("XML!");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]