Skip to content

Commit 77fd866

Browse files
authored
Update javascript.js
1 parent d4fef12 commit 77fd866

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

plugins/javascript.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,24 @@
3434
'postPutResources',
3535
function (txt) {
3636
jsNamesObj = this.internal.newObject();
37-
this.internal.write('<< /Names [(EmbeddedJS) ' + (jsNamesObj + 1) + ' 0 R] >>', 'endobj');
37+
this.internal.out('<<');
38+
this.internal.out('/Names [(EmbeddedJS) ' + (jsNamesObj + 1) + ' 0 R]');
39+
this.internal.out('>>');
40+
this.internal.out('endobj');
41+
3842
jsJsObj = this.internal.newObject();
39-
this.internal.write('<< /S /JavaScript /JS (', text, ') >>', 'endobj');
43+
this.internal.out('<<');
44+
this.internal.out('/S /JavaScript');
45+
this.internal.out('/JS (' + text + ')');
46+
this.internal.out('>>');
47+
this.internal.out('endobj');
4048
}
4149
);
4250
this.internal.events.subscribe(
4351
'putCatalog',
4452
function () {
4553
if (jsNamesObj !== undefined && jsJsObj !== undefined) {
46-
this.internal.write('/Names <</JavaScript ' + jsNamesObj + ' 0 R>>');
54+
this.internal.out('/Names <</JavaScript ' + jsNamesObj + ' 0 R>>');
4755
}
4856
}
4957
);

0 commit comments

Comments
 (0)