mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[api-minor] Add basic support for Launch
actions (issue 1778, issue 3897, issue 6616)
In general we neither want, nor can, support arbitrary `Launch` actions. But in practice, all the cases we've seen so far just contains relative URLs to other PDF files. Building on PR 7689, we can thus at least support basic `Launch` actions.
This commit is contained in:
parent
7e392c0205
commit
2b79782377
3 changed files with 49 additions and 0 deletions
|
@ -619,6 +619,8 @@ describe('api', function() {
|
|||
expect(outlineItem.title).toEqual('Chapter 1');
|
||||
expect(outlineItem.dest instanceof Array).toEqual(true);
|
||||
expect(outlineItem.url).toEqual(null);
|
||||
expect(outlineItem.unsafeUrl).toBeUndefined();
|
||||
expect(outlineItem.newWindow).toBeUndefined();
|
||||
|
||||
expect(outlineItem.bold).toEqual(true);
|
||||
expect(outlineItem.italic).toEqual(false);
|
||||
|
@ -644,6 +646,7 @@ describe('api', function() {
|
|||
expect(typeof outlineItemTwo.title).toEqual('string');
|
||||
expect(outlineItemTwo.dest).toEqual(null);
|
||||
expect(outlineItemTwo.url).toEqual('http://google.com/');
|
||||
expect(outlineItemTwo.unsafeUrl).toEqual('http://google.com');
|
||||
expect(outlineItemTwo.newWindow).toBeUndefined();
|
||||
|
||||
var outlineItemOne = outline[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue