Skip to content

Conversation

chmanie
Copy link
Contributor

@chmanie chmanie commented May 7, 2014

Safari reports the type of ArrayBuffer as 'object' (sic). This fixes the support check for the ArrayBuffer class.

MrRio added a commit that referenced this pull request May 7, 2014
change supportsArrayBuffer check to work with Safari
@MrRio MrRio merged commit 78797f1 into parallax:master May 7, 2014
@MrRio
Copy link
Member

MrRio commented May 7, 2014

Thanks!

@diegocr
Copy link
Contributor

diegocr commented May 7, 2014

FYI: Changes made to the dist files will be destroyed on the next build process.

Also, just wondering... if "Safari reports the type of ArrayBuffer as 'object'", how would typeof ArrayBuffer === 'function' causes a problem? it isn't checking against object and therefore i think you'll still get the same "Unsupported PNG image data" regardless. I'm missing something?

@MrRio
Copy link
Member

MrRio commented May 7, 2014

Ah yeah, didn't notice this was to dist.

Yeah not too sure. I shall fire it up in Safari

On Wed, May 7, 2014 at 5:41 PM, Diego Casorran notifications@github.comwrote:

FYI: Changes made to the dist files will be destroyed on the next build
process.

Also, just wondering... if "Safari reports the type of ArrayBuffer as
'object'"
, how would typeof ArrayBuffer === 'function' causes a problem?
it isn't checking against object and therefore i think you'll still get
the same "Unsupported PNG image data" regardless. I'm missing something?


Reply to this email directly or view it on GitHubhttps://github.com//pull/248#issuecomment-42451291
.

James Hall
Director

Parallax

Send big files to us using WeTransfer
https://parallaxagency.wetransfer.com/
https://parallaxagency.wetransfer.com/

+44 113 322 6477
http://parall.ax/

Registered office: The Old Brewery, High Court, Leeds, LS2 7ES
Registered in England no. 07430032
VAT No. 101 3405 84

@chmanie
Copy link
Contributor Author

chmanie commented May 7, 2014

Ah I'm sorry, I didn't notice either.
typeof ArrayBuffer === 'function' does not cause a problem. It results in throwing a 'PNG not supported' error, when it is actually supported. ArrayBuffer IS a function in Safari, but it's typeof is shown as 'object' (which is kind of correct, but not helpful).

I'm going to send a PR for the src.

@diegocr
Copy link
Contributor

diegocr commented May 7, 2014

Oh, i get that wrong, i thought Safari didn't support ArrayBuffer being the type a dummy/null object, according to MDN it is supported since version 5.1

Well, thanks chmanie :-)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants