Apply String.fromCharCode to array like objects #11172

cqql opened this Issue Mar 25, 2013 · 3 comments


None yet
3 participants

cqql commented Mar 25, 2013

In PhantomJS String.fromCharCode cannot be applied to array like objects like UInt8Array, even though this is valid.


JamesMGreene commented Mar 26, 2013

@cqql: Your code looks something like the following, right?

var codes = [65, 66, 67];
var result = String.fromCharCode.apply(null, codes);  // should return "ABC"

cqql commented Mar 26, 2013

My code looks like

String.fromCharCode.apply(null, new Uint8Array([65, 66, 67]))

In a browser this returns "ABC", but in phantomjs it results in

'String.fromCharCode.apply(null, new Uint8Array([65, 66, 67]))' is a cyclic structure


still relevant in npmjs package v1.9.7-1

TypeError: '[object Uint16Array]' is not a valid argument for 'Function.prototype.apply'

@aldeed aldeed referenced this issue in CollectionFS/DEPRECATING-cfs-file Mar 20, 2014

@aldeed aldeed add server tests for FS.Data and fix found issues; add Blob.js polyfi…
…ll so that we have phantomjs support (and travis tests can pass)

pfried referenced this issue in randdusing/cordova-plugin-bluetoothle Jul 29, 2014


How to write typed values #67

@rnicholus rnicholus added a commit to FineUploader/fine-uploader that referenced this issue Oct 20, 2015

@rnicholus rnicholus test(v4 chunked): simple chunking test for v4 sigs
Also removed support for PhantomJS tests/headless tests due to issue with typed arrays in Phantom (ariya/phantomjs#11172). Firefox should be the default unit testing browser now.

amir20 referenced this issue in amir20/phantomjs-node May 10, 2016


Evaluating XMLHttpRequest script #462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment