Index: src/JsValue.cpp |
diff --git a/src/JsValue.cpp b/src/JsValue.cpp |
index e3353a389d53ec2073df9c2e9f4310cb5d4b5ebb..fc3712c62bddc9bdd5f5eb722532ea484e9f2d4a 100644 |
--- a/src/JsValue.cpp |
+++ b/src/JsValue.cpp |
@@ -184,6 +184,13 @@ void AdblockPlus::JsValue::SetProperty(const std::string& name, const JsValuePtr |
SetProperty(name, val->UnwrapValue()); |
} |
+void AdblockPlus::JsValue::Push(const JsValuePtr& value) |
+{ |
+ const JsContext context(jsEngine); |
+ auto jsArray = v8::Local<v8::Array>::Cast(UnwrapValue()); |
+ jsArray->Set(jsArray->Length(), value->UnwrapValue()); |
+} |
+ |
void AdblockPlus::JsValue::SetProperty(const std::string& name, bool val) |
{ |
const JsContext context(jsEngine); |