summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/Document.cpp')
-rw-r--r--fpdfsdk/javascript/Document.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 9c680de906..161a5d09e9 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -91,6 +91,7 @@ JS_STATIC_PROP_ENTRY(path)
JS_STATIC_PROP_ENTRY(producer)
JS_STATIC_PROP_ENTRY(subject)
JS_STATIC_PROP_ENTRY(title)
+JS_STATIC_PROP_ENTRY(URL)
JS_STATIC_PROP_ENTRY(zoom)
JS_STATIC_PROP_ENTRY(zoomType)
END_JS_STATIC_PROP()
@@ -904,6 +905,18 @@ FX_BOOL Document::mouseY(IJS_Context* cc,
return TRUE;
}
+FX_BOOL Document::URL(IJS_Context* cc,
+ CJS_PropValue& vp,
+ CFX_WideString& sError) {
+ if (vp.IsSetting()) {
+ CJS_Context* pContext = static_cast<CJS_Context*>(cc);
+ sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
+ return FALSE;
+ }
+ vp << m_pDocument->GetPath();
+ return TRUE;
+}
+
FX_BOOL Document::baseURL(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {