* zin: refactor pagebase.

This commit is contained in:
Hao Sun
2023-01-31 13:57:58 +08:00
parent d33c0c44a7
commit dae503980a
+3 -1
View File
@@ -80,6 +80,8 @@ class pagebase extends \zin\core\wg
$headBuilder->append($this->buildChildren($this->blocks['head'], $isPrint, $parent));
}
$headBuilder->js('window.domReady = function(fn){if (document.readyState !== \'loading\') {fn();} else {document.addEventListener(\'DOMContentLoaded\', fn);}}');
return $headBuilder;
}
@@ -95,7 +97,7 @@ class pagebase extends \zin\core\wg
if($config->debug)
{
$builder->jsVar('window.zin', array('page' => $this));
$builder->js('console.table("zin.page", window.zin.page)');
$builder->js('console.log("zin.page", window.zin.page)');
}
return $builder;