Deployed 2063d78 to 5.4 with MkDocs 1.1.2 and mike 0.5.5
[GitHub/WoltLab/woltlab.github.io.git] / latest / javascript / new-api_core / index.html
index b1e2acfdf9aa7538a9bc1278c12a1853a8e8c0a7..70dbf4893cb446dce4d92f3d64d1972d9020c353 100644 (file)
@@ -10,7 +10,7 @@
       
       
       <link rel="shortcut icon" href="../../assets/default.favicon.ico">
-      <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.0.3">
+      <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.0.5">
     
     
       
@@ -18,7 +18,7 @@
       
     
     
-      <link rel="stylesheet" href="../../assets/stylesheets/main.1655a90d.min.css">
+      <link rel="stylesheet" href="../../assets/stylesheets/main.77f3fd56.min.css">
       
         
         <link rel="stylesheet" href="../../assets/stylesheets/palette.7fa14f5b.min.css">
@@ -31,7 +31,8 @@
     
     
     
-
+      
+    
     
     
       <link rel="stylesheet" href="../../stylesheets/extra.css">
       
     </div>
     
-      <label class="md-header__button md-icon" for="__search">
-        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
-      </label>
-      
-<div class="md-search" data-md-component="search" role="dialog">
-  <label class="md-search__overlay" for="__search"></label>
-  <div class="md-search__inner" role="search">
-    <form class="md-search__form" name="search">
-      <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
-      <label class="md-search__icon md-icon" for="__search">
-        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
-        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
-      </label>
-      <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
-        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
-      </button>
-    </form>
-    <div class="md-search__output">
-      <div class="md-search__scrollwrap" data-md-scrollfix>
-        <div class="md-search-result" data-md-component="search-result">
-          <div class="md-search-result__meta">
-            Initializing search
-          </div>
-          <ol class="md-search-result__list"></ol>
-        </div>
-      </div>
-    </div>
-  </div>
-</div>
     
+      <div class="md-header__source">
+        
+<a href="https://github.com/WoltLab/docs.woltlab.com/" title="Go to repository" class="md-source" data-md-component="source">
+  <div class="md-source__icon md-icon">
+    
+    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
+  </div>
+  <div class="md-source__repository">
+    GitHub
+  </div>
+</a>
+      </div>
     
   </nav>
 </header>
     WoltLab Suite Documentation
   </label>
   
+    <div class="md-nav__source">
+      
+<a href="https://github.com/WoltLab/docs.woltlab.com/" title="Go to repository" class="md-source" data-md-component="source">
+  <div class="md-source__icon md-icon">
+    
+    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
+  </div>
+  <div class="md-source__repository">
+    GitHub
+  </div>
+</a>
+    </div>
+  
   <ul class="md-nav__list" data-md-scrollfix>
     
       
             <article class="md-content__inner md-typeset">
               
                 
+                  <a href="https://github.com/WoltLab/docs.woltlab.com/edit/5.4/docs/javascript/new-api_core.md" title="Edit this page" class="md-content__button md-icon">
+                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
+                  </a>
+                
                 
                 <h1 id="core-modules-and-functions-javascript-api">Core Modules and Functions - JavaScript API<a class="headerlink" href="#core-modules-and-functions-javascript-api" title="Permanent link">#</a></h1>
 <p>A brief overview of common methods that may be useful when writing any module.</p>
@@ -2087,7 +2088,6 @@ to non-plain objects, these instances will be copied by reference.</p>
   <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">obj2</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&quot;a&quot;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nx">obj2</span><span class="p">.</span><span class="nx">a</span> <span class="o">===</span> <span class="mf">1</span><span class="p">);</span> <span class="c1">// output: true</span>
 <span class="p">});</span>
 </code></pre></div>
-
 <h3 id="extendbase-object-merge-object-object"><code>extend(base: Object, ...merge: Object[]): Object</code><a class="headerlink" href="#extendbase-object-merge-object-object" title="Permanent link">#</a></h3>
 <p>Accepts an infinite amount of plain objects as parameters, values will be copied
 from the 2nd...nth object into the first object. The first parameter will be
@@ -2103,7 +2103,6 @@ cloned and the resulting object is returned.</p>
   <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&quot;a&quot;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">a</span> <span class="o">===</span> <span class="mf">2</span><span class="p">);</span> <span class="c1">// output: false</span>
 <span class="p">});</span>
 </code></pre></div>
-
 <h3 id="inheritbase-object-target-object-merge-object"><code>inherit(base: Object, target: Object, merge?: Object)</code><a class="headerlink" href="#inheritbase-object-target-object-merge-object" title="Permanent link">#</a></h3>
 <p>Derives the second object's prototype from the first object, afterwards the
 derived class will pass the <code>instanceof</code> check against the original class.</p>
@@ -2142,7 +2141,6 @@ derived class will pass the <code>instanceof</code> check against the original c
   <span class="k">return</span> <span class="nx">Baz</span><span class="p">;</span>
 <span class="p">});</span>
 </code></pre></div>
-
 <h3 id="isplainobjectobject-object-boolean"><code>isPlainObject(object: Object): boolean</code><a class="headerlink" href="#isplainobjectobject-object-boolean" title="Permanent link">#</a></h3>
 <p>Verifies if an object is a plain JavaScript object and not an object instance.</p>
 <div class="highlight"><pre><span></span><code><span class="nx">require</span><span class="p">([</span><span class="s2">&quot;Core&quot;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">Core</span><span class="p">)</span> <span class="p">{</span>
@@ -2159,7 +2157,6 @@ derived class will pass the <code>instanceof</code> check against the original c
   <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">Core</span><span class="p">.</span><span class="nx">isPlainObject</span><span class="p">(</span><span class="nx">obj2</span><span class="p">));</span> <span class="c1">// output: false</span>
 <span class="p">});</span>
 </code></pre></div>
-
 <h3 id="triggereventelement-element-eventname-string"><code>triggerEvent(element: Element, eventName: string)</code><a class="headerlink" href="#triggereventelement-element-eventname-string" title="Permanent link">#</a></h3>
 <p>Creates and dispatches a synthetic JavaScript event on an element.</p>
 <div class="highlight"><pre><span></span><code><span class="nx">require</span><span class="p">([</span><span class="s2">&quot;Core&quot;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">Core</span><span class="p">)</span> <span class="p">{</span>
@@ -2167,7 +2164,6 @@ derived class will pass the <code>instanceof</code> check against the original c
   <span class="nx">Core</span><span class="p">.</span><span class="nx">triggerEvent</span><span class="p">(</span><span class="nx">element</span><span class="p">,</span> <span class="s2">&quot;click&quot;</span><span class="p">);</span>
 <span class="p">});</span>
 </code></pre></div>
-
 <h2 id="language"><code>Language</code><a class="headerlink" href="#language" title="Permanent link">#</a></h2>
 <h3 id="addkey-string-value-string"><code>add(key: string, value: string)</code><a class="headerlink" href="#addkey-string-value-string" title="Permanent link">#</a></h3>
 <p>Registers a new phrase.</p>
@@ -2177,7 +2173,6 @@ derived class will pass the <code>instanceof</code> check against the original c
   <span class="p">});</span>
 <span class="p">&lt;/</span><span class="nt">script</span><span class="p">&gt;</span>
 </code></pre></div>
-
 <h3 id="addobjectobject-object"><code>addObject(object: Object)</code><a class="headerlink" href="#addobjectobject-object" title="Permanent link">#</a></h3>
 <p>Registers a list of phrases using a plain object.</p>
 <div class="highlight"><pre><span></span><code><span class="p">&lt;</span><span class="nt">script</span> <span class="na">data-relocate</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="p">&gt;</span>
@@ -2188,7 +2183,6 @@ derived class will pass the <code>instanceof</code> check against the original c
   <span class="p">});</span>
 <span class="p">&lt;/</span><span class="nt">script</span><span class="p">&gt;</span>
 </code></pre></div>
-
 <h3 id="getkey-string-parameters-object-string"><code>get(key: string, parameters?: Object): string</code><a class="headerlink" href="#getkey-string-parameters-object-string" title="Permanent link">#</a></h3>
 <p>Retrieves a phrase by its key, optionally supporting basic template scripting
 with dynamic variables passed using the <code>parameters</code> object.</p>
@@ -2199,7 +2193,6 @@ with dynamic variables passed using the <code>parameters</code> object.</p>
   <span class="p">});</span>
 <span class="p">});</span>
 </code></pre></div>
-
 <h2 id="stringutil"><code>StringUtil</code><a class="headerlink" href="#stringutil" title="Permanent link">#</a></h2>
 <h3 id="escapehtmlstr-string-string"><code>escapeHTML(str: string): string</code><a class="headerlink" href="#escapehtmlstr-string-string" title="Permanent link">#</a></h3>
 <p>Escapes special HTML characters by converting them into an HTML entity.</p>
@@ -2240,6 +2233,19 @@ and could alter the behavior when embedded into regular expressions.</p>
 <p>Converts some HTML entities into their original character. This is the reverse
 function of <code>escapeHTML()</code>.</p>
                 
+                  
+                    
+
+<hr>
+<div class="md-source-date">
+  <small>
+    
+      Last update: 2021-01-08
+    
+  </small>
+</div>
+                  
+                
               
               
                 
@@ -2299,6 +2305,7 @@ function of <code>escapeHTML()</code>.</p>
         <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
           Material for MkDocs
         </a>
+        
       </div>
       <div class="md-footer-copyright">
        <a href="https://www.woltlab.com/legal-notice/">Legal Notice</a> 
@@ -2315,7 +2322,7 @@ function of <code>escapeHTML()</code>.</p>
     <script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}, "search": "../../assets/javascripts/workers/search.fb4a9340.min.js", "version": {"provider": "mike"}}</script>
     
     
-      <script src="../../assets/javascripts/bundle.ca5457b8.min.js"></script>
+      <script src="../../assets/javascripts/bundle.5cf3e710.min.js"></script>
       
     
   </body>