Index: include/AdblockPlus/JsEngine.h |
=================================================================== |
--- a/include/AdblockPlus/JsEngine.h |
+++ b/include/AdblockPlus/JsEngine.h |
@@ -211,6 +211,13 @@ |
*/ |
void SetLogSystem(LogSystemPtr val); |
+ /** |
+ * Sets a global property that can be accessed by all the scripts. |
+ * @param name Name of the property to set. |
+ * @param value Value of the property to set. |
+ */ |
+ void SetGlobalProperty(const std::string& name, AdblockPlus::JsValuePtr value); |
+ |
private: |
JsEngine(); |
@@ -220,6 +227,7 @@ |
v8::Isolate* isolate; |
V8ValueHolder<v8::Context> context; |
EventMap eventCallbacks; |
+ JsValuePtr globalJsObject; |
}; |
} |