> Among other changes, the updated CLA gives the Foundation the ability to re-license contributions under Apache 2.0.
But they already said:
> There is no need to get new signatures for old contributions
So they're not planning on getting all old contributions to be updated to the new CLA, but they think the new CLA will let them relicense the entire code base under Apache 2.0. That's not how that works! But it gets worse, because when challenged the lawyer quotes the updated CLA language:
> You understand and agree that the JS Foundation projects and your Contributions are public and that a record of the Contributions (including all metadata and personal information you submit with them) is maintained indefinitely and may be redistributed consistent with the JS Foundation’s policies and the requirements of the Apache v2.0 license where they are relevant.
"You [...] agree that [...] your Contributions are public and that a record of the Contributions (including all metadata and personal information you submit with them) [...] may be redistributed consistent with [...] the requirements of the Apache v2.0 license where they are relevant."
That's clearly saying that they may need to provide people with the record of your contribution in order to prove that, eg, the Apache v2.0 license is being complied with. It is not an agreement that your actual contribution is licensed (or can be relicensed) under the Apache v2.0 license.
This is just magical thinking. You can't just mumble the words "Apache 2.0" somewhere in the general neighborhood of a legal document and have it magically relicense years of contributions. You certainly can't make people agree that metadata about your contribution can be shared with some people, and then expect that to magically change the license under which the contribution itself exists.
I don't know where to stand. One side, maybe you need all these red-tapes so that you don't get in any trouble. But this makes me feel like things are not going to progress and people will eventually turn away.
Haven't we already seen too many examples like this? Things start small, they get popular, people jump in to use, then things get political and it dies out.
document.getElementsByClassName("my-class")[0].style.display = 'block';
The PlainJS site mentions that it's not quite that simple and suggests writing your own show() and hide() functions if you're avoiding jQuery.
https://plainjs.com/javascript/effects/hide-or-show-an-eleme...
But it was fun and I learned a lot, so there is that.
It would need to be something like this, though it still doesn't automatically handle inline vs block:
document.querySelectorAll('.my-elements').forEach(function(el){el.style.display = 'block'})
And apparently there are issues even with that: https://css-tricks.com/snippets/javascript/loop-queryselecto...
const $ = (() => {
function listProxy(arr) {
return new Proxy(arr, {
set: (t, p, v, r) => {
for(let x of t) {
x[p] = v;
}
},
get: (t, p, r) => {
if(t.length > 0 && t[0][p] instanceof Function) {
return (...args) => { Array.prototype.map.call(t, (x) => x[p](args)) };
} else {
return listProxy( Array.prototype.map.call(t, (x) => x[p]) );
}
}
})
}
return (sel, root) => {
if(root === undefined) root = document;
return listProxy(root.querySelectorAll(sel));
}
})();
// use like this:
$('.my-elements').className = 'Important';
$('.my-elements').style.color = 'Red';
$('.my-elements').classList.add('Another');
demo: https://codepen.io/anon/pen/RxGgNR document.querySelectorAll('.myclass')
.forEach(el => el.style.display = 'block')
The jQuery is still shorter, but the vanilla js is definitely manageable. Array.from(document.querySelectorAll('.myclass'))
.forEach(el => el.style.display = 'block')Just haven't taken the time... at least the main app I work on at work doesn't need to support IE11. Latest Edge,, Firefox, Safari and Chrome ... and Chrome is the primary target.
https://developer.mozilla.org/en-US/docs/Web/API/NodeList/fo...
NodeList.prototype.forEach = Array.prototype.forEach;
In Chrome this even returns true: NodeList.prototype.forEach === Array.prototype.forEach Array.prototype.forEach.call(document.querySelectorAll('div'), console.log)
seams to workMissing:
Try doing this with CSS, please.
<div class="element"></div>
.element { display: block; }
.element.is-hidden { display: none; }
document.getElementsByClassName("element")[0].classList.add( "is-hidden" );
You should never ask yourself "How can I accomplish that without jQuery", but rather "What would be the best way to do it!"Yes, jQuery Mobile never really became a thing, but jQuery UI has some pretty useful widgets (autocomplete, date picker, sortable, etc.)
the parts of it i want are very simple though. i can (and have) written my own replacements, but I don't want to throw my own one-off replacement into the projects I use, so having some kind of community library is much better.
I often tell myself, ok, I'm going to just use vanilla JS for this one, but compared to jQuery, it's way too verbose. Try doing $('.my-elements').show() in vanilla js.
The problem is the jQuery foundation has become too bureaucratic, making contributions harder. Example: https://github.com/globalizejs/globalize/pull/703