diff options
Diffstat (limited to 'source/pdf/pdf-js.c')
-rw-r--r-- | source/pdf/pdf-js.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/pdf/pdf-js.c b/source/pdf/pdf-js.c index 63892d98..84938d30 100644 --- a/source/pdf/pdf-js.c +++ b/source/pdf/pdf-js.c @@ -505,6 +505,15 @@ static void declare_dom(pdf_js *js) /* Create the 'app' object */ js_newobject(J); { +#if defined(_WIN32) || defined(_WIN64) + js_pushstring(J, "WIN"); +#elif defined(__APPLE__) + js_pushstring(J, "MAC"); +#else + js_pushstring(J, "UNIX"); +#endif + js_defproperty(J, -2, "app.platform", JS_READONLY | JS_DONTENUM | JS_DONTCONF); + addmethod(J, "app.alert", app_alert, 4); addmethod(J, "app.execDialog", app_execDialog, 0); addmethod(J, "app.execMenuItem", app_execMenuItem, 1); |