Add php to console debug function
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -22,4 +22,11 @@ class GlModelViewer extends ImageHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static function console_log($data, $add_script_tags = false) {
|
||||
$command = 'console.log('. json_encode($data, JSON_HEX_TAG).');';
|
||||
if ($add_script_tags) {
|
||||
$command = '<script>'. $command . '</script>';
|
||||
}
|
||||
echo $command;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user