Updated Style Guide (markdown)
parent
e6e11a804e
commit
866f2a80fd
@ -35,17 +35,17 @@ if (someVar)
|
|||||||
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. Also, note the naming of all anonymous functions.
|
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. Also, note the naming of all anonymous functions.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var Name = (function NameClosure() {
|
var ClassName = (function ClassNameClosure() {
|
||||||
function Name(name) {
|
function ClassName(...) {
|
||||||
this.name = name;
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
Name.prototype = {
|
ClassName.prototype = {
|
||||||
functionName: function Name_FunctionName(argOne, argTwo) {
|
functionName: function ClassName_functionName(...) {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return Name;
|
return ClassName;
|
||||||
})();
|
})();
|
||||||
```
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user