Skip to content

develephant/corona-html5-console-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo Corona HTML5 Console Plugin

A simple plugin for logging to the browser console window.

Yes, you can easily use the print command while viewing the index-debug.html file in your HTML5 build. But, this plugin allows you to output to the browser console using the normal index.html build.

Pretty amazing stuff.

Browser Tests

chrome ie firefox safari opera
pass untested pass pass untested

Windows browser unconfirmed.

Installation

  • Download the Corona HTML5 Console Plugin respository.
  • Move plugin/console.lua and plugin/console_js.js to the root of your HTML5 project.
  • Require the plugin in your code where you need it.
local console = require("console")

API

Not much to it...

log

Log message data to the browser console window.

console.log(data)

The data argument can be a Number, String, Boolean, or Table type.

Array table types are output as JS arrays. Regular table types are output as JS objects.

Example

local console = require("console")

console.log("Wow, something happened!")

Demo

A Corona project can be found in the demo directory that can be compiled to an HTML5 build for testing.

Notes

  • You'll need your browsers "Developer Tools" open to view the console output.

©2018 C. Byerley (develephant)

Releases

No releases published

Packages

No packages published