373 karma · joined December 26, 2019
<dom-calc>
const p = document.createElement('button');
p.innerText = 'hi';
p.onclick = () => alert('hi');
return p;
</dom-calc>
For something like: class CalcElement extends HTMLElement {
connectedCallback() {
setTimeout(() => {
const fn = new Function(this.innerText);
this.replaceWith(fn());
}, 0);
}
}
customElements.define('dom-calc', CalcElement);<script>document.write(`<p>foo</p>`)</script>
It's not perfect but better than your typical closed source software.
Google's websites frequently use binary-like formats where json is just an array of values with no properties, and most of these values are numbers. See for example Gmail.
The only long term way is to parse visible text.
ci -l .yourfile
And that's it. No setup necessary!
If you ever outgrow it, you can easily convert to more modern version control.
By native scaling I mean absolutely no bitmap scaling. If rendering happened at target scale then all pixels would match grid and no artifacts would be possible. I can't even imagine how ClearType could work with bitmap scaling when it targets individual subpixels.
I think people have wildly different sensitivity to resolution. I know some that can't tell difference between 4k and 1080p and 1080p scaled on 4k screen. Some crazy people even think MacOS has good font rendering.
[0] https://gitlab.freedesktop.org/wayland/wayland-protocols/-/i...
Update:
I can still see open bugs such as https://gitlab.gnome.org/GNOME/mutter/-/issues/1135. Are they outdated?
At least in Electron textboxes have standard context menu and drag and drop.
Regardless, even in case of package managers that don't have install scripts (e.g. Maven) one could simply insert malware directly into library code and have it execute whenever you run tests or your application.
The only true solution would be some sort of sophisticated sandboxing or sophisticated malware detection or distributed code review.