[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/blocks/ -> 908.min.js (source)

   1  (self.webpackChunkWordPress=self.webpackChunkWordPress||[]).push([[908],{908:function(t,e,o){o.r(e),o.d(e,{actions:function(){return u},state:function(){return l}});var r=o(998);const n=new Map,i=t=>{const e=new URL(t,window.location);return e.pathname+e.search},s=t=>{const e={},o=`data-$r.directivePrefix}-router-region`;t.querySelectorAll(`[$o}]`).forEach((t=>{const n=t.getAttribute(o);e[n]=(0,r.toVdom)(t)}));const n=t.querySelector("title")?.innerText;return{regions:e,title:n}},a=t=>{const e=`data-$r.directivePrefix}-router-region`;document.querySelectorAll(`[$e}]`).forEach((o=>{const n=o.getAttribute(e),i=(0,r.getRegionRootFragment)(o);(0,r.render)(t.regions[n],i)})),t.title&&(document.title=t.title)};let c="";window.addEventListener("popstate",(async()=>{const t=i(window.location),e=n.has(t)&&await n.get(t);e?a(e):window.location.reload()})),n.set(i(window.location),Promise.resolve(s(document)));const{state:l,actions:u}=(0,r.store)("core/router",{actions:{*navigate(t,e={}){const o=i(t);c=t,u.prefetch(o,e);const r=new Promise((t=>{var o;return setTimeout(t,null!==(o=e.timeout)&&void 0!==o?o:1e4)})),s=yield Promise.race([n.get(o),r]);c===t&&(s?(a(s),window.history[e.replace?"replaceState":"pushState"]({},"",t)):(window.location.assign(t),yield new Promise((()=>{}))))},prefetch(t,e={}){t=i(t),!e.force&&n.has(t)||n.set(t,(async(t,{html:e})=>{try{if(!e){const o=await window.fetch(t);if(200!==o.status)return!1;e=await o.text()}const o=(new window.DOMParser).parseFromString(e,"text/html");return s(o)}catch(t){return!1}})(t,e))}}})}}]);


Generated : Wed Jan 31 08:20:02 2024 Cross-referenced by PHPXref