/* * Copyright (C) 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once #include "root.h" #include "ExceptionOr.h" #include "wtf/Vector.h" #include "wtf/WeakPtr.h" #include "wtf/text/WTFString.h" #include namespace WebCore { class DOMURL; class URLSearchParams : public RefCounted { public: static ExceptionOr> create(std::variant>, Vector>, String>&&); static Ref create(const String& string, DOMURL* associatedURL) { return adoptRef(*new URLSearchParams(string, associatedURL)); } void append(const String& name, const String& value); void remove(const String& name); String get(const String& name) const; Vector getAll(const String& name) const; bool has(const String& name) const; void set(const String& name, const String& value); String toString() const; void updateFromAssociatedURL(); void sort(); class Iterator { public: explicit Iterator(URLSearchParams&); std::optional> next(); private: Ref m_target; size_t m_index { 0 }; }; Iterator createIterator() { return Iterator { *this }; } private: const Vector>& pairs() const { return m_pairs; } URLSearchParams(const String&, DOMURL*); URLSearchParams(const Vector>&); void updateURL(); WeakPtr m_associatedURL; Vector> m_pairs; }; } // namespace WebCore install'>dave/postinstall Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines
2022-07-04[internal] Fix duplicate symbol issueGravatar Jarred Sumner 1-3/+0
2022-07-04Fix npm peer dep issueGravatar Jarred Sumner 2-2/+3
2022-07-04[bench] Add a react ssr hello worldGravatar Jarred Sumner 2-0/+37
2022-07-04Update bun.lockbGravatar Jarred Sumner 1-0/+0
2022-07-04Update README.mdGravatar Jarred Sumner 1-15/+6
2022-07-04[resolver] Add a test for self-referencing package.json exportsGravatar Jarred Sumner 1-0/+44
2022-07-04Bump docker build of webkitGravatar Jarred Sumner 1-1/+1
2022-07-04[itnernal] Cleanup some of the streams codeGravatar Jarred Sumner 7-792/+846
2022-07-04[internal] Add a note explaining what to do if this failsGravatar Jarred Sumner 1-0/+4
2022-07-04[jsc] Handle promise ownership (might revert this)Gravatar Jarred Sumner 1-3/+8
2022-07-04[jsc] Run JSC's deferredWorkTimer sometimesGravatar Jarred Sumner 1-1/+1
2022-07-04[jsc] Attempt to make detecting ArrayBuffer/Uint8Array fasterGravatar Jarred Sumner 1-13/+128
2022-07-04[server] Clean up some of the logic for freeing ReadableStreamGravatar Jarred Sumner 1-3/+30
2022-07-04Update __global.zigGravatar Jarred Sumner 1-4/+4
2022-07-04[jsc] Make JSC own the memory for source code stringsGravatar Jarred Sumner 2-19/+40