### ----------------------------------------------------
### -- PDF::Class
### -- Licenses: Artistic-2.0
### -- Authors: David Warring
### -- File: lib/PDF/Action/JavaScript.rakumod
### ----------------------------------------------------
#| /Action Subtype - JavaScript
unit class PDF::Action::JavaScript;
use PDF::Action;
use PDF::COS::Dict;

also is PDF::COS::Dict;
also does PDF::Action;

use ISO_32000::Table_217-Additional_entries_specific_to_a_JavaScript_action;
also does ISO_32000::Table_217-Additional_entries_specific_to_a_JavaScript_action;

use ISO_32000_2::Table_221-Additional_entries_specific_to_an_ECMAScript_action;
also does ISO_32000_2::Table_221-Additional_entries_specific_to_an_ECMAScript_action;

use PDF::COS::Tie;
use PDF::Class::Defs :TextOrStream;

has TextOrStream $.JS is entry(:required, :coerce(&coerce-text-or-stream), :alias<java-script>); # (Required) A text string or text stream containing the JavaScript script to be executed. PDFDocEncoding or Unicode encoding (the latter identified by the Unicode prefix U+ FEFF) shall be used to encode the contents of thestring or stream.


