[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Firefox 4 and blacklist reporting
- To: public_webgl@khronos.org
- Subject: [Public WebGL] Firefox 4 and blacklist reporting
- From: Arthur Blume <arthurb@google.com>
- Date: Mon, 28 Mar 2011 13:44:17 -0400
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1301334259; bh=/A1J+7cxeASoUWziDDsqmlwIYm8=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=NFMQfyJiwBQbFaSygNqQ2cvcWXhb9lVGFH6j2XE68cgqBzzMpZmE+zIrm4QQHL1WQ CRJd6pnX1GfNw4gg2mTXg==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=TBvTUkyHLcwW2nVaBX843cvEyZn+7bnrb3SFYv4Ha1w=; b=FtUJELb/gfXbCc2Vn0LX9uf9MzRiYTCwoVCzrsV/jPmT/dTZdyaGtP2fS/45bzav5/ oMOa9gzfZ0ss1fuZkzRQ==
- Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:date:message-id:subject:from:to:content-type; b=K2C2JxuLfEI2U/s1dXZZdkNezgRtlzXAhywIZ0KjDM8KUF60rVWaOQQLxFezgILgmE dlw/tI7XkOdaX5phgpqA==
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- Sender: owner-public_webgl@khronos.org
Hi all -- I work on Google Body. Our latest "check WebGL capabilities" code will look approximately like this:
* * *
// 0 = OK. 1 = no GL. 2 = GL couldn't initialize. Other = error text.
function testGL() {
try {
if (!window.WebGLRenderingContext) { return 1; }
var canvas = document.getElementById('gltest');
var gl = canvas.getContext('webgl');
if (!gl) {
gl = canvas.getContext('experimental-webgl');
}
if (!gl) { return 2; }
return 0;
} catch(err) {
// [report err.message]
}
}
Using FF4/Mac on OS X 10.5.8, the above throws an exception, with err.message =
"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLCanvasElement.getContext]"
I understand from the Firefox blocklist wiki page that Firefox is blacklisting WebGL. I'm curious why this is being reported via an exception. The problem I'm having is that I want to show different UI for these two cases:
- GL is blacklisted (=> fine, can take user to troubleshooting page and coach them through it)
- A _javascript_ error occurred (=> not fine, need to investigate)
and I'm not sure what the best way going forward is to distinguish those cases.
Any thoughts?