summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 506250d)
raw | patch | inline | side by side (parent: 506250d)
author | ishmal <ishmal@users.sourceforge.net> | |
Sun, 27 Aug 2006 23:31:14 +0000 (23:31 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Sun, 27 Aug 2006 23:31:14 +0000 (23:31 +0000) |
src/dom/dom.h | patch | blob | history | |
src/dom/jsbind.cpp | patch | blob | history |
diff --git a/src/dom/dom.h b/src/dom/dom.h
index 64f1e6dde77cb2f903df976f9fbd81c8accbac3c..bf0d0534ab1e0ab87e0f6af61941ce4940d06ebe 100644 (file)
--- a/src/dom/dom.h
+++ b/src/dom/dom.h
typedef enum
{
- DOMERROR_SEVERITY_WARNING = 1,
- DOMERROR_SEVERITY_ERROR = 2,
- DOMERROR_SEVERITY_FATAL_ERROR = 3
+ SEVERITY_WARNING = 1,
+ SEVERITY_ERROR = 2,
+ SEVERITY_FATAL_ERROR = 3
} ErrorSeverity;
diff --git a/src/dom/jsbind.cpp b/src/dom/jsbind.cpp
index be9b22f705ebccba5e6e482cad557fc9ede51c1f..0fdbc77aed96fe1e47a7f573c76f34fba0cf0ca0 100644 (file)
--- a/src/dom/jsbind.cpp
+++ b/src/dom/jsbind.cpp
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
private:
JSFunctionSpec ECMA_UserDataHandler::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};
JSObject *newObj = JS_InitClass(cx, obj, proto, &classDef,
JSConstructor, 0,
properties, methods,
- NULL, NULL);
+ staticProperties, NULL);
return newObj;
}
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
private:
// Standard JS Binding fields
static JSClass classDef;
+ enum
+ {
+ prop_severity,
+ prop_message,
+ prop_type,
+ prop_relatedException,
+ prop_relatedData,
+ prop_location
+ };
static JSPropertySpec properties[];
static JSFunctionSpec methods[];
+ static JSPropertySpec staticProperties[];
};
JSPropertySpec ECMA_DOMError::properties[] =
{
+ { "severity", prop_severity,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "message", prop_message,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "type", prop_type,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "relatedException", prop_relatedException,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "relatedData", prop_relatedData,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "location", prop_location,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
{ 0 }
};
JSFunctionSpec ECMA_DOMError::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
- { 0 }
+ { 0 }
};
+JSPropertySpec ECMA_DOMError::staticProperties[] =
+{
+ { "SEVERITY_WARNING", DOMError::SEVERITY_WARNING,
+ JSPROP_READONLY, JSGetEnumProperty },
+ { "SEVERITY_ERROR", DOMError::SEVERITY_ERROR,
+ JSPROP_READONLY, JSGetEnumProperty },
+ { "SEVERITY_FATAL_ERROR", DOMError::SEVERITY_FATAL_ERROR,
+ JSPROP_READONLY, JSGetEnumProperty },
+ { 0 }
+};
+
/**
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
private:
// Standard JS Binding fields
static JSClass classDef;
+ enum
+ {
+ prop_lineNumber,
+ prop_columnNumber,
+ prop_byteOffset,
+ prop_utf16Offset,
+ prop_relatedNode,
+ prop_uri,
+ };
static JSPropertySpec properties[];
static JSFunctionSpec methods[];
JSPropertySpec ECMA_DOMLocator::properties[] =
{
+ { "lineNumber", prop_lineNumber,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "columnNumber", prop_columnNumber,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "byteOffset", prop_byteOffset,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "utf16Offset", prop_utf16Offset,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "relatedNode", prop_relatedNode,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "uri", prop_uri,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
{ 0 }
};
JSFunctionSpec ECMA_DOMLocator::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};
/**
*
*/
- static JSBool getName(JSContext *cx, JSObject *obj,
+ static JSBool setParameter(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *rval)
{
return JS_FALSE;
/**
*
*/
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
+ static JSBool getParameter(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *rval)
{
return JS_FALSE;
/**
*
*/
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
+ static JSBool canSetParameter(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *rval)
{
return JS_FALSE;
// Standard JS Binding fields
static JSClass classDef;
+ enum
+ {
+ prop_parameterNames
+ };
static JSPropertySpec properties[];
static JSFunctionSpec methods[];
JSPropertySpec ECMA_DOMConfiguration::properties[] =
{
+ { "parameterNames", prop_parameterNames,
+ JSPROP_ENUMERATE|JSPROP_READONLY },
{ 0 }
};
JSFunctionSpec ECMA_DOMConfiguration::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
+ { "setParameter", setParameter, 2, 0, 0 },
+ { "getParameter", getParameter, 1, 0, 0 },
+ { "canSetParameter", canSetParameter, 2, 0, 0 },
{ 0 }
};
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
private:
JSFunctionSpec ECMA_CDATASection::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
private:
// Standard JS Binding fields
static JSClass classDef;
+ enum
+ {
+ prop_name,
+ prop_entities,
+ prop_notations,
+ prop_systemId,
+ prop_publicId,
+ prop_internalSubset
+ };
static JSPropertySpec properties[];
static JSFunctionSpec methods[];
JSPropertySpec ECMA_DocumentType::properties[] =
{
+ { "name", prop_name, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "entities", prop_entities, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "notations", prop_notations, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "systemId", prop_systemId, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "publicId", prop_publicId, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "internalSubset", prop_internalSubset, JSPROP_ENUMERATE|JSPROP_READONLY },
{ 0 }
};
JSFunctionSpec ECMA_DocumentType::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
-
private:
// Standard JS Binding fields
static JSClass classDef;
+ enum
+ {
+ prop_publicId,
+ prop_systemId
+ };
static JSPropertySpec properties[];
static JSFunctionSpec methods[];
JSPropertySpec ECMA_Notation::properties[] =
{
+ { "publicId", prop_publicId, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "systemId", prop_systemId, JSPROP_ENUMERATE|JSPROP_READONLY },
{ 0 }
};
JSFunctionSpec ECMA_Notation::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
private:
// Standard JS Binding fields
static JSClass classDef;
+ enum
+ {
+ prop_publicId,
+ prop_systemId,
+ prop_notationName,
+ prop_inputEncoding,
+ prop_xmlEncoding,
+ prop_xmlVersion
+ };
static JSPropertySpec properties[];
static JSFunctionSpec methods[];
JSPropertySpec ECMA_Entity::properties[] =
{
+ { "publicId", prop_publicId, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "systemId", prop_systemId, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "notationName", prop_notationName, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "inputEncoding", prop_inputEncoding, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "xmlEncoding", prop_xmlEncoding, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "xmlVersion", prop_xmlVersion, JSPROP_ENUMERATE|JSPROP_READONLY },
{ 0 }
};
JSFunctionSpec ECMA_Entity::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
private:
JSFunctionSpec ECMA_EntityReference::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};
return JS_FALSE;
}
- /**
- *
- */
- static JSBool getName(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool getNamespaceURI(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool contains(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
-
- /**
- *
- */
- static JSBool containsNS(JSContext *cx, JSObject *obj,
- uintN argc, jsval *argv, jsval *rval)
- {
- return JS_FALSE;
- }
private:
// Standard JS Binding fields
static JSClass classDef;
static JSPropertySpec properties[];
+ enum
+ {
+ prop_target,
+ prop_data
+ };
static JSFunctionSpec methods[];
};
JSPropertySpec ECMA_ProcessingInstruction::properties[] =
{
+ { "target", prop_target, JSPROP_ENUMERATE|JSPROP_READONLY },
+ { "data", prop_data, JSPROP_ENUMERATE },
{ 0 }
};
JSFunctionSpec ECMA_ProcessingInstruction::methods[] =
{
- { "getName", getName, 1, 0, 0 },
- { "getNamespaceURI", getNamespaceURI, 1, 0, 0 },
- { "contains", contains, 1, 0, 0 },
- { "containsNS", containsNS, 2, 0, 0 },
{ 0 }
};