是否有Uint8Array的多个实现?

时间:2016-01-17 16:52:14

标签: javascript

var x = new Uint8Array(3); x.fill(128); // Safari 9: "TypeError: x.fill is not a function. (In 'x.fill(128)', 'x.fill' is undefined)" console.log(x); // Chrome 47 and FF 43 print "[128, 128, 128]" 有不同的实现吗?这段代码在Safari和Chrome / FF中表现不同:

Uint8Array

我对fill()的不同在线描述感到困惑。 Mozilla开发者网络在此处描述了fill()方法:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill。但是Java Scripture没有提到Uint8Array作为一种方法:http://www.javascripture.com/Uint8Array

如何在Safari中初始化<Path Data="M125.11371,0.5 L141.0695,20.500002 L249.5,20.500002 L249.5, 119.5 L0.5,119.5 L0.5,20.500002 L108.9748,20.500002 z" Fill="#FF2D2D2D" Stretch="Fill" Stroke="#FF2D2D2D" UseLayoutRounding="False" Width="250" Height="100"/>

我在这里缺少什么?

0 个答案:

没有答案
相关问题