Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Namespace for pbjs

Open cwbeck opened this issue 11 years ago • 6 comments

Hi,

Is there any plan to eventually namespace this project? While it will not be an issue for publishers, it could impact networks trying to use it and distribute it as it might conflict with some publisher's sites.

It would be nice to specify a top-level namespace other than pbjs pre-build.

Thanks,

Chris

cwbeck avatar Nov 24 '15 10:11 cwbeck

Hi @cwbeck,

Do you mean another alias that is longer? pbjs is the global namespace as of now.

mkendall07 avatar Nov 24 '15 17:11 mkendall07

Hi @mkendall07

Correct, pbjs is the global namespace, but would it be possible to set this as a variable in the build so we could for example have abcd instead? This would prevent any conflicts whereby pbjs was already in use by someone else.

cwbeck avatar Nov 25 '15 10:11 cwbeck

I agree, this would be very helpful!

baragona avatar Jan 19 '16 22:01 baragona

Maybe it would be helpful if prebid.js could be require'd like a library from other code, and that when used this way, the global variable would have a randomized name to prevent conflicts from other usages?

baragona avatar Feb 17 '16 20:02 baragona

Assigning back to @protonate - as soon as the commit was closed.

Heray avatar Mar 28 '16 21:03 Heray

merged

mkendall07 avatar Jul 08 '16 12:07 mkendall07