2

Chrome has a bug where it doesn't properly report download progress for gzip-encoded content. I found a library that works around it, as far as I understand by injecting the fix into the DOM.

Now I'm wondering, if link to both this library and my own js file on an html page, would the GPL force me to release the code of my own js file?

<script type="text/javascript" src="chrome-bugfix-library.js"></script>
<script type="text/javascript" src="my-code.js"></script>

I don't use any new API introduced by the library, and my code already worked correctly in Firefox, but with that fix features I developed now work correctly in Chrome as well.

So since I didn't have to change any of my source code as a result of including that GPL-licensed library, I guess I could at least argue that it's not a derivative work?

Must I disclose my source or not?

So I guess this is a more specific version of this question: What are the implications of licensing a JavaScript library under GPL?

EDIT: I got a message from the library developer that I could use it under the MIT license, so that solves my problem, however I'm still curious as to the answer of my question. Are function calls due to polyfills enough to invoke GPL terms?

  • You realise the js file in question is being disclosed already to everyone who loads the web page, yes? – MadHatter Sep 7 at 9:45
  • Yes, just wondering if I have to supply an unminified version and if others are allowed to use my code under the terms of the GPLv3 as well – bobbaluba Sep 7 at 9:57
  • As I understand it, you're proposing to put up a web page which contains some JS of your own, and also an HTML pointer (web link) to someone else's GPL library, is that right? Other than the mere aggregation of the two on a single web page, is there any reason why the JS might have any kind of licensing dependency on the GPL library? – MadHatter Sep 7 at 10:03
  • Yeah, but the library has a fix that makes my existing code work in Chrome. Edited the question to try to clarify. – bobbaluba Sep 7 at 10:10
  • 1
    Ah, I see. You're not merely linking to the library, you're distributing it. Does my-code.js contain any calls to functions in chrome-bugfix-library.js? – MadHatter Sep 7 at 10:11
1

You've written a webpage which contains some of your own JS. This JS requires a call provided by a third-party library, published under GPL, which you also make available on your server.

Firstly, you have GPL obligations with respect to the existing library. These include (but are not limited to) making (unminified) source available on demand, and providing a copy of the licence text. Both of these could be easily accomplished by links in your webpage.

In addition, you wonder whether your JS code must also be made available under GPL. Opinion is divided on whether linking to a GPL library makes your work a derivative; some say it does, others say it doesn't, and the question remains unsettled. Personally, I believe it does, in which case, yes, you must provide unminified source under GPL on demand.

But you also note that the library author has agreed to make the library available to you under the MIT licence, so the question is now moot.

| improve this answer | |
  • 1
    I don't think the characterization in your first paragraph is correct. As I read the comments on the question, the OP's JS calls a standard, browser supplied, API and the GPL library monkey-patches that API. – Bart van Ingen Schenau Sep 7 at 16:37
  • @BartvanIngenSchenau as I understand it, the OP's JS calls the GPL library, it just calls it using what would ordinarily be a standard call which in this case the library has redefined. If that's so, it's still very much the library that's being called. But I could certainly have the wrong end of the stick. – MadHatter Sep 7 at 19:18
  • 1
    I don't dispute that the GPL library gets called, but the GPL library does not define this API. If your reasoning holds, I could write a GPL version of libc and then sue every closed-source linux application for infringing my copyrights. I believe that if a GPL library offers an alternative implementation of an API that is defined elsewhere, then an application using that API can't be automatically deemed to be a derived work of that GPL library. – Bart van Ingen Schenau Sep 7 at 20:01
  • 2
    @BartvanIngenSchenau I don't agree. By my reasoning, you could write a GPL version of libc and then sue every closed-source vendor who actually shipped and used it, is all. OP is shipping this library. His code calls the library, as he intends that it should do. Is that not so? – MadHatter Sep 7 at 20:05
  • Let's agree to disagree. I can see where you are coming from, but I don't agree that your reasoning holds. – Bart van Ingen Schenau Sep 7 at 20:10
1

You have created a combined work - the web page.

The web page is a derivative of a GPL work, because it contains parts of it.

All derivative works of GPL works must be GPL.


There is an exception - if your use is "mere aggregation" then you do not need to make the entire derivative work GPL (only the combined part). An example of "mere aggregation" is a disk containing different pieces of software, some of which are GPL. In this case, the whole disk doesn't have to be GPL.

However, since you are actually using the software, it's not "mere aggregation".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.