You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -285,7 +285,7 @@ autoload.include("folder.File"); // throws no exception when file is missing.
285
285
```
286
286
287
287
### Loading other JS files
288
-
The later sections will explain how to load the various types of files. However, if you want to load any other type of file, provided you have configured the root director of the `autoload` object, use the below code.
288
+
The later sections will explain how to load the various types of files. However, if you want to load any other type of file, provided you have configured the root directory of the `autoload` object, use the below code.
289
289
```javascript
290
290
// folder structure
291
291
|root
@@ -306,7 +306,7 @@ let Utility = new js.classes.Utility();
306
306
```
307
307
# UI
308
308
## OSM - OpenScript Markup
309
-
OSM allows you to write markup using javascript method. In OJS, there is an object called `h` representing the `MarkupEngine`. You can create any element using this object similar to HTML. Just like HTML in the browser, OSM is element agnostic.
309
+
OSM allows you to write markup using Javascript method. In OJS, there is an object called `h` representing the `MarkupEngine`. You can create any element using this object similar to HTML. Just like HTML in the browser, OSM is element agnostic.
310
310
311
311
### Syntax
312
312
```javascript
@@ -324,7 +324,7 @@ h.$anSVGElement(
324
324
325
325
```
326
326
* To create an element, use `h.elementName()`.
327
-
* Attributes are key-value pairs passed to the element in objects. Replace every dash with underscore in the attribute names.
327
+
* Attributes are key-value pairs passed to the element in objects. Replace every dash with an underscore in the attribute names.
328
328
* Add children to the element following the above guide. Note that you can also pass an array of children and attributes to an element.
329
329
330
330
### OSM Example
@@ -346,13 +346,13 @@ h.div(
346
346
347
347
```
348
348
### Special Attributes
349
-
Some attributes are special and tells OJS Markup engine to perform specific actions when rendering.
349
+
Some attributes are special and tell OJS Markup engine to perform specific actions when rendering.
350
350
351
351
| Attribute | Value | Function |
352
352
|-----------|-------|----------|
353
353
| parent | HTML Element| appends the rendered OSM to the parent element.|
354
354
| resetParent| boolean| tells OJS to replace the elements in the parent with the rendered OSM.|
355
-
| replaceParent | boolean | tells OJS to replace parent element completely with the rendered OSM |
355
+
| replaceParent | boolean | tells OJS to replace the parent element completely with the rendered OSM |
356
356
| firstOfParent | boolean | tells OJS to place the rendered OSM as the first child of the parent element|
357
357
| c_attr | object of attributes | used as attributes for the wrapper element of a rendered OSM component|
358
358
| listeners | object of event-callback pairs | equivalent to `element.addEventListener(event, callback)`|
@@ -456,7 +456,7 @@ h.button(
456
456
```
457
457
>Components address this using the `this.method(...args)` or `this.xMethod(...args)` methods. This will be shown under the components section.
458
458
459
-
#### Escaping Formatting
459
+
#### Escape Formats
460
460
The arguments will be formatted such that they are parsable when placed in the `HTML` markup. for example:
0 commit comments