123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>std/jsformdata</title>
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
- <!-- JS -->
- <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
- </head>
- <body>
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">std/jsformdata</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-select-wrapper">
- <label for="theme-select">Theme: </label>
- <select id="theme-select" onchange="setTheme(this.value)">
- <option value="auto">🌗 Match OS</option>
- <option value="dark">🌑 Dark</option>
- <option value="light">🌕 Light</option>
- </select>
- </div>
- <div id="global-links">
- <ul class="simple-boot">
- <li><a href="manual.html">Manual</a></li>
- <li><a href="lib.html">Standard library</a></li>
- <li> <a id="indexLink" href="theindex.html">Index</a></li>
- <li><a href="compiler/theindex.html">Compiler docs</a></li>
- <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
- <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="search" id="searchInput"
- oninput="search()" />
- </div>
-
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#FormData" title="FormData = ref object of JsRoot">FormData</a></li>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">$
- <li><a class="reference" href="#%24%2CFormData" title="`$`(self: FormData): string">`$`(self: FormData): string</a></li>
- </ul>
- <ul class="simple nested-toc-section">[]
- <li><a class="reference" href="#%5B%5D%2CFormData%2Ccstring" title="`[]`(self: FormData; name: cstring): cstring">`[]`(self: FormData; name: cstring): cstring</a></li>
- </ul>
- <ul class="simple nested-toc-section">[]=
- <li><a class="reference" href="#%5B%5D%3D%2CFormData%2Ccstring%2C" title="`[]=`(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob)">`[]=`(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob)</a></li>
- </ul>
- <ul class="simple nested-toc-section">add
- <li><a class="reference" href="#add%2CFormData%2Ccstring%2C" title="add(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob)">add(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob)</a></li>
- <li><a class="reference" href="#add%2CFormData%2Ccstring%2C%2Ccstring" title="add(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob;
- filename: cstring)">add(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob;
- filename: cstring)</a></li>
- </ul>
- <ul class="simple nested-toc-section">clear
- <li><a class="reference" href="#clear%2CFormData" title="clear(self: FormData)">clear(self: FormData)</a></li>
- </ul>
- <ul class="simple nested-toc-section">delete
- <li><a class="reference" href="#delete%2CFormData%2Ccstring" title="delete(self: FormData; name: cstring)">delete(self: FormData; name: cstring)</a></li>
- </ul>
- <ul class="simple nested-toc-section">getAll
- <li><a class="reference" href="#getAll%2CFormData%2Ccstring" title="getAll(self: FormData; name: cstring): seq[cstring]">getAll(self: FormData; name: cstring): seq[cstring]</a></li>
- </ul>
- <ul class="simple nested-toc-section">hasKey
- <li><a class="reference" href="#hasKey%2CFormData%2Ccstring" title="hasKey(self: FormData; name: cstring): bool">hasKey(self: FormData; name: cstring): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">keys
- <li><a class="reference" href="#keys%2CFormData" title="keys(self: FormData): seq[cstring]">keys(self: FormData): seq[cstring]</a></li>
- </ul>
- <ul class="simple nested-toc-section">len
- <li><a class="reference" href="#len%2CFormData" title="len(self: FormData): int">len(self: FormData): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">newFormData
- <li><a class="reference" href="#newFormData" title="newFormData(): FormData">newFormData(): FormData</a></li>
- </ul>
- <ul class="simple nested-toc-section">pairs
- <li><a class="reference" href="#pairs%2CFormData" title="pairs(self: FormData): seq[tuple[key, val: cstring]]">pairs(self: FormData): seq[tuple[key, val: cstring]]</a></li>
- </ul>
- <ul class="simple nested-toc-section">put
- <li><a class="reference" href="#put%2CFormData%2Ccstring%2C%2Ccstring" title="put(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob;
- filename: cstring)">put(self: FormData; name: cstring; value: SomeNumber | bool | cstring | Blob;
- filename: cstring)</a></li>
- </ul>
- <ul class="simple nested-toc-section">toCstring
- <li><a class="reference" href="#toCstring%2CFormData" title="toCstring(self: FormData): cstring">toCstring(self: FormData): cstring</a></li>
- </ul>
- <ul class="simple nested-toc-section">values
- <li><a class="reference" href="#values%2CFormData" title="values(self: FormData): seq[cstring]">values(self: FormData): seq[cstring]</a></li>
- </ul>
- </ul>
- </details>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L1" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
- <div id="tocRoot"></div>
-
- <p class="module-desc"><ul class="simple"><li><tt class="docutils literal"><span class="pre"><span class="Identifier">FormData</span></span></tt> for the JavaScript target: <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData">https://developer.mozilla.org/en-US/docs/Web/API/FormData</a></li>
- </ul>
- <p><strong class="examples_text">Example: cmd: -r:off</strong></p>
- <pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">jsformdata</span>
- <span class="Keyword">let</span> <span class="Identifier">data</span><span class="Punctuation">:</span> <span class="Identifier">FormData</span> <span class="Operator">=</span> <span class="Identifier">newFormData</span><span class="Punctuation">(</span><span class="Punctuation">)</span>
- <span class="Identifier">data</span><span class="Punctuation">[</span><span class="StringLit">"key0"</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">"value0"</span><span class="Operator">.</span><span class="Identifier">cstring</span>
- <span class="Identifier">data</span><span class="Operator">.</span><span class="Identifier">add</span><span class="Punctuation">(</span><span class="StringLit">"key1"</span><span class="Operator">.</span><span class="Identifier">cstring</span><span class="Punctuation">,</span> <span class="StringLit">"value1"</span><span class="Operator">.</span><span class="Identifier">cstring</span><span class="Punctuation">)</span>
- <span class="Identifier">data</span><span class="Operator">.</span><span class="Identifier">delete</span><span class="Punctuation">(</span><span class="StringLit">"key1"</span><span class="Punctuation">)</span>
- <span class="Identifier">assert</span> <span class="Identifier">data</span><span class="Operator">.</span><span class="Identifier">hasKey</span><span class="Punctuation">(</span><span class="StringLit">"key0"</span><span class="Punctuation">)</span>
- <span class="Identifier">assert</span> <span class="Identifier">data</span><span class="Punctuation">[</span><span class="StringLit">"key0"</span><span class="Punctuation">]</span> <span class="Operator">==</span> <span class="StringLit">"value0"</span><span class="Operator">.</span><span class="Identifier">cstring</span>
- <span class="Identifier">data</span><span class="Operator">.</span><span class="Identifier">clear</span><span class="Punctuation">(</span><span class="Punctuation">)</span>
- <span class="Identifier">assert</span> <span class="Identifier">data</span><span class="Operator">.</span><span class="Identifier">len</span> <span class="Operator">==</span> <span class="DecNumber">0</span></pre></p>
- <div class="section" id="6">
- <h1><a class="toc-backref" href="#6">Imports</a></h1>
- <dl class="item">
- <a class="reference external" href="dom.html">dom</a>
- </dl>
- </div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <div id="FormData">
- <dt><pre><a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="system.html#JsRoot"><span class="Identifier">JsRoot</span></a></pre></dt>
- <dd>
-
- FormData API.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L7" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L7" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <div id="$-procs-all">
- <div id="$,FormData">
- <dt><pre><span class="Keyword">func</span> <a href="#%24%2CFormData"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L56" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L56" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="[]-procs-all">
- <div id="[],FormData,cstring">
- <dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%2CFormData%2Ccstring"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.get(#)"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/get">https://developer.mozilla.org/en-US/docs/Web/API/FormData/get</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L47" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L47" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="[]=-procs-all">
- <div id="[]=,FormData,cstring,">
- <dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%3D%2CFormData%2Ccstring%2C"><span class="Identifier">`[]=`</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">;</span>
- <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#SomeNumber"><span class="Identifier">SomeNumber</span></a> <span class="Operator">|</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> <span class="Operator">|</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> <span class="Operator">|</span> <a href="dom.html#Blob"><span class="Identifier">Blob</span></a><span class="Other">)</span> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.set(#, #)"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/set">https://developer.mozilla.org/en-US/docs/Web/API/FormData/set</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L44" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L44" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="add-procs-all">
- <div id="add,FormData,cstring,">
- <dt><pre><span class="Keyword">func</span> <a href="#add%2CFormData%2Ccstring%2C"><span class="Identifier">add</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">;</span>
- <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#SomeNumber"><span class="Identifier">SomeNumber</span></a> <span class="Operator">|</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> <span class="Operator">|</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> <span class="Operator">|</span> <a href="dom.html#Blob"><span class="Identifier">Blob</span></a><span class="Other">)</span> {.
- <span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.append(#, #)"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/append">https://developer.mozilla.org/en-US/docs/Web/API/FormData/append</a><div class="admonition admonition-info"><span class="admonition-info-text"><b>Hint:</b></span>
- Duplicate keys are allowed and order is preserved.</div>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L11" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L11" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="add,FormData,cstring,,cstring">
- <dt><pre><span class="Keyword">func</span> <a href="#add%2CFormData%2Ccstring%2C%2Ccstring"><span class="Identifier">add</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">;</span>
- <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#SomeNumber"><span class="Identifier">SomeNumber</span></a> <span class="Operator">|</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> <span class="Operator">|</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> <span class="Operator">|</span> <a href="dom.html#Blob"><span class="Identifier">Blob</span></a><span class="Other">;</span> <span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.
- <span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.append(#, #, #)"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/append">https://developer.mozilla.org/en-US/docs/Web/API/FormData/append</a><div class="admonition admonition-info"><span class="admonition-info-text"><b>Hint:</b></span>
- Duplicate keys are allowed and order is preserved.</div>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L16" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L16" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="clear-procs-all">
- <div id="clear,FormData">
- <dt><pre><span class="Keyword">func</span> <a href="#clear%2CFormData"><span class="Identifier">clear</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">)</span> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"(() => { const frmdt = #; Array.from(frmdt.keys()).forEach((key) => frmdt.delete(key)) })()"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- Convenience func to delete all items from <tt class="docutils literal"><span class="pre"><span class="Identifier">FormData</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L50" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L50" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="delete-procs-all">
- <div id="delete,FormData,cstring">
- <dt><pre><span class="Keyword">func</span> <a href="#delete%2CFormData%2Ccstring"><span class="Identifier">delete</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.$1(#)"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/delete">https://developer.mozilla.org/en-US/docs/Web/API/FormData/delete</a><div class="admonition admonition-warning"><span class="admonition-warning-text"><b>Warning:</b></span>
- Deletes <em>all items</em> with the same key name.</div>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L21" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L21" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getAll-procs-all">
- <div id="getAll,FormData,cstring">
- <dt><pre><span class="Keyword">func</span> <a href="#getAll%2CFormData%2Ccstring"><span class="Identifier">getAll</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">]</span> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.$1(#)"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/getAll">https://developer.mozilla.org/en-US/docs/Web/API/FormData/getAll</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L26" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L26" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="hasKey-procs-all">
- <div id="hasKey,FormData,cstring">
- <dt><pre><span class="Keyword">func</span> <a href="#hasKey%2CFormData%2Ccstring"><span class="Identifier">hasKey</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.has(#)"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/has">https://developer.mozilla.org/en-US/docs/Web/API/FormData/has</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L29" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L29" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="keys-procs-all">
- <div id="keys,FormData">
- <dt><pre><span class="Keyword">func</span> <a href="#keys%2CFormData"><span class="Identifier">keys</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">]</span> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"Array.from(#.$1())"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/keys">https://developer.mozilla.org/en-US/docs/Web/API/FormData/keys</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L32" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L32" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="len-procs-all">
- <div id="len,FormData">
- <dt><pre><span class="Keyword">func</span> <a href="#len%2CFormData"><span class="Identifier">len</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"Array.from(#.entries()).length"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L58" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L58" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="newFormData-procs-all">
- <div id="newFormData">
- <dt><pre><span class="Keyword">func</span> <a href="#newFormData"><span class="Identifier">newFormData</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"new FormData()"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L9" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L9" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="pairs-procs-all">
- <div id="pairs,FormData">
- <dt><pre><span class="Keyword">func</span> <a href="#pairs%2CFormData"><span class="Identifier">pairs</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">,</span> <span class="Identifier">val</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">]</span><span class="Other">]</span> {.
- <span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"Array.from(#.entries())"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/entries">https://developer.mozilla.org/en-US/docs/Web/API/FormData/entries</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L38" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L38" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="put-procs-all">
- <div id="put,FormData,cstring,,cstring">
- <dt><pre><span class="Keyword">func</span> <a href="#put%2CFormData%2Ccstring%2C%2Ccstring"><span class="Identifier">put</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">;</span>
- <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#SomeNumber"><span class="Identifier">SomeNumber</span></a> <span class="Operator">|</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> <span class="Operator">|</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> <span class="Operator">|</span> <a href="dom.html#Blob"><span class="Identifier">Blob</span></a><span class="Other">;</span> <span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.
- <span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"#.set(#, #, #)"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/set">https://developer.mozilla.org/en-US/docs/Web/API/FormData/set</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L41" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L41" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="toCstring-procs-all">
- <div id="toCstring,FormData">
- <dt><pre><span class="Keyword">func</span> <a href="#toCstring%2CFormData"><span class="Identifier">toCstring</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"JSON.stringify(#)"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L54" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L54" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="values-procs-all">
- <div id="values,FormData">
- <dt><pre><span class="Keyword">func</span> <a href="#values%2CFormData"><span class="Identifier">values</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="jsformdata.html#FormData"><span class="Identifier">FormData</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">]</span> {.<span class="Identifier">importjs</span><span class="Other">:</span> <span class="StringLit">"Array.from(#.$1())"</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/FormData/values">https://developer.mozilla.org/en-US/docs/Web/API/FormData/values</a>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/jsformdata.nim#L35" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/jsformdata.nim#L35" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- </div>
- </div>
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br>
- <small style="color: var(--hint);">Made with Nim. Generated: 2024-12-25 08:36:28 UTC</small>
- </div>
- </div>
- </div>
- <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
-
- </body>
- </html>
|