为什么此 processing.js 代码未在 Firefox 中显示? [英] Why is this processing.js code not displaying in firefox?

查看:56
本文介绍了为什么此 processing.js 代码未在 Firefox 中显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<html>
<body>
<script src="processing.js"></script>
<script type="text/processing" data-processing-target="mycanvas">

Table table;
void setup() {
  table = new Table();
  table.addColumn("name");
  table.addColumn("type");
  TableRow newRow = table.addRow();
  newRow.setString("name", "Lion");
  newRow.setString("type", "Mammal");
  newRow = table.addRow();
  newRow.setString("name", "Snake");
  newRow.setString("type", "Reptile");
  newRow = table.addRow();
  newRow.setString("name", "Mosquito");
  newRow.setString("type", "Insect");

  println(table.getStringColumn("name"));
}
</script>
<canvas id="mycanvas"></canvas>
</body>
</html>

为什么这段代码没有在 Firefox 中显示?它应该打印名称"列中的所有值.此示例直接来自 processing.js 网站.

Why is this code not displaying in Firefox? It should print all values in the column "name". This example is directly from the processing.js website.

推荐答案

Processing.js 没有实现较新的 Processing Table 类,所以除非你提供你的自己的 Table 类的处理实现(例如作为要加载的附加文件).

Processing.js has no implementation of the newer Processing Table class, so it won't be doing very much unless you supply your own Processing implementation of the Table class (as additional file to load, for instance).

目前支持的 API 可以在 http://processingjs.org/reference/

The currently supported API can be found on http://processingjs.org/reference/

这篇关于为什么此 processing.js 代码未在 Firefox 中显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆