MCPcopy Create free account
hub / github.com/NativeScript/android / GetAll

Method GetAll

test-app/runtime/src/main/cpp/URLSearchParamsImpl.cpp:204–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202 }
203
204 void URLSearchParamsImpl::GetAll(const v8::FunctionCallbackInfo<v8::Value> &args) {
205 URLSearchParamsImpl *ptr = GetPointer(args.This());
206 auto isolate = args.GetIsolate();
207 auto context = isolate->GetCurrentContext();
208 if (ptr == nullptr) {
209 args.GetReturnValue().Set(v8::Array::New(isolate));
210 return;
211 }
212 auto key = args[0].As<v8::String>();
213 auto values = ptr->GetURLSearchParams()->get_all(ArgConverter::ConvertToString(key));
214 auto ret = v8::Array::New(isolate, values.size());
215 size_t i = 0;
216 for (auto item: values) {
217 ret->Set(context, i++, ArgConverter::ConvertToV8String(isolate, item));
218 }
219 args.GetReturnValue().Set(ret);
220 }
221
222 void URLSearchParamsImpl::Has(const v8::FunctionCallbackInfo<v8::Value> &args) {
223 URLSearchParamsImpl *ptr = GetPointer(args.This());

Callers

nothing calls this directly

Calls 8

NewFunction · 0.85
ThisMethod · 0.80
GetReturnValueMethod · 0.80
get_allMethod · 0.80
GetURLSearchParamsMethod · 0.80
GetIsolateMethod · 0.45
SetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected