- From: François REMY <francois.remy.dev@outlook.com>
- Date: Mon, 14 Jan 2013 19:24:46 +0100
- To: "cam@mcc.id.au" <cam@mcc.id.au>
- CC: "public-nextweb@w3.org" <public-nextweb@w3.org>
Hi, Marcos Caceres seemed quite confused about the modulo used in the web idl spec. I said him that he could use the % symbol of ECMAScript to perform the operation even if that was not a true modulo, because this is what the spec seems to imply. Can you confirm me it is indeed the case? Right now, I must admit I'm a bit confused too because I ran the following test in all modern browsers (Chrome Canary, Aurora, Opera Snapshots and IE10) and it returned the result I would expect from a true modulo, not from the JS one: >> t = new ArrayBuffer(1) >> v = new DataView(t) >> v.setUint8(0,-1) >> v.getUint8(0) 255 It would probably be good to actually clarify which modulo is actually used by browsers and use that one in the spec? Best regards, François [PS] The definition of setUint8 is as follows: --------------------------------------------------------------- void setUint8(unsigned long byteOffset, octet value); ---------------------------------------------------------------
Received on Monday, 14 January 2013 18:25:21 UTC