pages tagged Javascripthroy.euhttps://hroy.eu/tags/Javascript/hroy.euikiwiki2023-10-30T21:08:30ZGNU GPL, JS and BShttps://hroy.eu/posts/gpl-js-bs/2023-10-30T21:08:30Z2014-03-28T23:00:00Z
<aside>
<a href="https://hroy.eu/posts/gpl-js-bs/js.png"><img src="https://hroy.eu/posts/gpl-js-bs/js.png" width="100" height="100" alt="JS" class="pull-right aside" /></a>
</aside>
<p><small>This is a long due post, in response to a thread about a <a
href="http://scripting.com/2013/09/16/concordOurGplOutliner">new JS
outliner released under the GPL</a>. I just did not take the time to
write something about it until now… sorry!</small></p>
<p>It’s quite outstanding, but trying to find some good resource online
about this issue is nearly impossible. If you try to read about how the
<a href="https://hroy.eu/tags/GnuGeneralPublicLicense/">GNU GPL</a> impacts javascript web
apps, you will find so much nonsense—that will make you believe the GPL
is going to “infect” everything. (In spite of the fact that some of the
most important Javascript libraries out there are licensed under the
GPL, like Jquery IIRC.)</p>
<p>First, let’s get things straight: the GNU GPL does not infect
anything nor has any “viral” effect. You don’t catch the GPL like the
flu. In order for GPL obligations to kick in and apply to you, you must
either:</p>
<ol type="1">
<li><p>distribute GPL-licensed Javascript files; or</p></li>
<li><p>write something that is <em>based on</em> GPL-licensed Javascript
files.</p></li>
</ol>
<p>In the first case, it’s no surprises that if you download and
distribute GPL-licensed software, you must respect the conditions of the
GPL.</p>
<p>In the second case, it’s a little bit more difficult to grasp,
because you need to understand what constitutes a work <em>based on the
GPL program.</em> And for this, you need an basic understanding of
copyright law.</p>
<p>If you build other Javascript parts which will work with the GPL
Javascript, there’s a fair chance that the whole is based on the GPL
Javascript and thus is subject to the conditions of the GPL. (That’s the
intended effect: it’s <a
href="https://www.gnu.org/copyleft/">copyleft</a>!) So for instance, if
you write Javascript in which you re-use the functions of the GPL JS
library, that will be covered by the GPL as well.</p>
<p>But for pretty much everything else, it’s not covered. So basically,
just <strong>adding a line of <code>script</code> to interact with the
DOM is not going to make the entire website subject to the GPL</strong>.
That would be like saying using LibreOffice forces you to distribute all
documents produced with it under the GPL. It’s just nonsense. Keep in
mind that this is a legal thing, this is copyright law; this is not
software development.</p>
<p>So in the case of the <a
href="http://scripting.com/2013/09/16/concordOurGplOutliner">Concord
outliner</a> it’s pretty obvious: if you put an outliner in your web
app, it’s not going to make the whole web app covered by the GPL.
However, if you integrate the outliner and that you build your web app
on top of that outliner; you expand it, so yes, that’s covered. But hey,
that’s what the GPL is for.</p>
<p>Otherwise, write your own software from scratch or try a program with
an alternative license, like the MPL-2.0.</p>