-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTECH_README.txt
30 lines (23 loc) · 1.25 KB
/
TECH_README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
READ FIRST OF ALL
1) I don't know why, but 'tslib' in es5 compilation uses constructions like this:
d.__proto__ = b;
or
Object.setPrototypeOf
to support records like
class A extends B { ... }
It is the terrible shit because of this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf
There is a warning about not to use it.
In future I'll try to replace it with something more correct.
2) Window location and absolute references
window.addEventListener('hashchange', (e) => {console.log(location.hash)})
goog.global.location.origin + goog.global.location.pathname + goog.global.location.search
https://stackoverflow.com/questions/6390341/how-to-detect-url-change-in-javascript
3) Pay attention to document.querySelectAll
https://stackoverflow.com/questions/16791527/can-i-use-a-regular-expression-in-queryselectorall
var dom = stage.domElement();
console.log(dom);
var selection1 = dom.querySelectorAll('[fill^="url("]');
var selection2 = dom.querySelectorAll('[clip-path*="url("]'); //TODO find the difference between ^= and *=
console.log(selection1);
console.log(selection2);
4) Different DEFS + USE usage: http://tutorials.jenkov.com/svg/defs-element.html