Answered
Migrating scripts from ExtendScript to UXP PageSideOptions and XMLElementPosition Enumerations issue
I have an extendscript that creates an Indesign document. Refactoring the code to UXP isn't working for two different enumerators. first
if(myPage.side === PageSideOptions.leftHand){...}. ReferenceError: PageSideOptions is not defined
and second
if (tagNamesAfter.includes(tagName)) {
myXMLElement.insertTextAsContent("\r", XMLElementPosition.AFTER_ELEMENT);
}
if (tagNamesBefore.includes(tagName)) {
myXMLElement.insertTextAsContent("\r", XMLElementPosition.BEFORE_ELEMENT);
} ReferenceError: XMLElementPosition is not defined. I understand that UXP is work in process. are enumerators supposed to be referenced differently in UXP. Any suggestions on workarounds would be appreciated. These snippets work correctly in the extendscript version.
