Is Braintree's braintree-data.js producing an FB global?

208 views Asked by At

https://js.braintreegateway.com/v1/braintree-data.js

produces a function called createThirdPartyBlock, which (upon calling BraintreeData.setup) injects

https://www.paypalobjects.com/webstatic/r/fb/fb-all-prod.pp.min.js
(gist copy (for posterity): https://gist.github.com/csmosx/55fae21b78468e6ba55f)

Which seems to be adding an FB global... thus overriding any existing FB global, including the Facebook SDK.

Why they would want to do this I have no idea, but the code is there.

Can anyone else confirm this behavior?

2

There are 2 answers

0
csmosx On BEST ANSWER

I was notified by Braintree Support on 2015-6-8 that this was fixed.

Braintree Case #400185

1
Adnan Y On

Yes. The script has a FB global. Afterall, they combination of the alphabets FB is not owned by facebook. Given that there in a function called thirdpartyblock, I would haphazard a guess that you aren't meant to have any other scripts running on the iframe that is created by the parent script anyway.