aboutsummaryrefslogtreecommitdiffstats
path: root/async.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-10-24 15:54:43 +0200
committerThomas Lange <code@nerdmind.de>2021-10-24 15:54:43 +0200
commitcbe7e31f68d4ca2bfcd53dffdb130f1f84be3343 (patch)
tree4e285e9a92116c11c2d72245e71af4422b65a961 /async.php
parent6d69bab4d07cd502d78b565ee9eba3b1e9296931 (diff)
downloadbigpipe-cbe7e31f68d4ca2bfcd53dffdb130f1f84be3343.tar.gz
bigpipe-cbe7e31f68d4ca2bfcd53dffdb130f1f84be3343.tar.xz
bigpipe-cbe7e31f68d4ca2bfcd53dffdb130f1f84be3343.zip
Split up BigPipe "enabled" method into two methods
Split up the "enabled" method of the BigPipe class into two methods, one to check if the pipelining mode is currently enabled ("isEnabled") and another one to enable/disable the pipelining mode ("setEnabled"). This change prevents that a single method has two different jobs, which can be confusing for programmers who didn't wrote the code but only use them. Now there are two clearly named methods for exactly one job.
Diffstat (limited to 'async.php')
-rw-r--r--async.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/async.php b/async.php
index 3d444c8..a82c91a 100644
--- a/async.php
+++ b/async.php
@@ -29,7 +29,7 @@ require_once 'include/pagelets.php';
<!-- >>> [Additional code for the async function] -->
<script>
var Application = {
- bigPipeEnabled: <?=json_encode(BigPipe\BigPipe::enabled())?>,
+ bigPipeEnabled: <?=json_encode(BigPipe\BigPipe::isEnabled())?>,
placeholderHTML: function(HTML) {
document.getElementById('placeholder_container').innerHTML = HTML;