In #791 the consesus was that how to create classes should be on wiki.
parent
0014f42dd8
commit
25e5ceb884
16
Style-Guide.md
Normal file
16
Style-Guide.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Style Guide
|
||||||
|
## Classes
|
||||||
|
The standard way of creating classes in pdf.js is the following. Please note that by class we mean an object that is class-like.
|
||||||
|
<pre>
|
||||||
|
var Name = (function NameConstructor() {
|
||||||
|
function Name(name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
Name.prototype = {
|
||||||
|
};
|
||||||
|
...
|
||||||
|
|
||||||
|
return Name;
|
||||||
|
})();
|
||||||
|
</pre>
|
||||||
Loading…
x
Reference in New Issue
Block a user