简体   繁体   English

Braintree的braintree-data.js是否在全球范围内生成FB?

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

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

produces a function called createThirdPartyBlock, which (upon calling BraintreeData.setup) injects 产生一个名为createThirdPartyBlock的函数,该函数(在调用BraintreeData.setup时)注入

https://www.paypalobjects.com/webstatic/r/fb/fb-all-prod.pp.min.js https://www.paypalobjects.com/webstatic/r/fb/fb-all-prod.pp.min.js
(gist copy (for posterity): https://gist.github.com/csmosx/55fae21b78468e6ba55f ) (要点副本(用于后代): https : //gist.github.com/csmosx/55fae21b78468e6ba55f

Which seems to be adding an FB global... thus overriding any existing FB global, including the Facebook SDK. 似乎正在添加一个FB全局...从而覆盖了任何现有的FB全局,包括Facebook SDK。

Why they would want to do this I have no idea, but the code is there. 他们为什么要这样做,我不知道,但是代码在那里。

Can anyone else confirm this behavior? 其他人可以确认这种行为吗?

Yes. 是。 The script has a FB global. 该脚本具有FB全局变量。 Afterall, they combination of the alphabets FB is not owned by facebook. 毕竟,Facebook并不拥有字母FB的组合。 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. 鉴于存在一个名为thirdpartyblock的函数,我很可能会猜测您并不意味着要在父脚本创建的iframe上运行任何其他脚本。

I was notified by Braintree Support on 2015-6-8 that this was fixed. Braintree支持在2015-6-8通知我,此问题已修复。

Braintree Case #400185 Braintree案例#400185

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM