Again I need help.
I am designing a new plugin in witch I need to detect the ENTER key.
The problem is that Development Tools Debugger doesn’t accept script tag in the index.html file.
I get this error even there isn’t a script between the tags: Uncaught UxpRuntimeError: Refusing to load inline script tag as executable code. Code generation is disabled in plugins.
If I add the script to detect the keyboardEvent another error is added: Uncaught UxpRuntimeError: Refusing to load event handler tag as executable code. Code generation is disabled in plugins.
I uninstalled & reinstalled Photoshop & UXP Developer Tools.
Then striped both index files to almost nothing and still get the following error:
Uncaught UxpRuntimeError: Refusing to load event handler tag as executable code. Code generation is disabled in plugins.
at Object.logInternalUncaughtException (uxp://uxp-internal/runtime_scripts_loader.js:2)
at e.exports.didChangeAttributeForElement (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports.didChangeAttributeForElement (uxp://uxp-internal/domjs_scripts.js:2)
at didChangeAttribute (uxp://uxp-internal/domjs_scripts.js:2)
at a.set value [as value] (uxp://uxp-internal/domjs_scripts.js:2)
at a.set nodeValue [as nodeValue] (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports.setAttribute (uxp://uxp-internal/domjs_scripts.js:2)
at Object.createElement (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports._appendElement (uxp://uxp-internal/domjs_scripts.js:2)
at uxp://uxp-internal/domjs_scripts.js:2
o @ uxp://uxp-internal/r…scripts_loader.js:2
logInternalUncaughtException @ uxp://uxp-internal/r…scripts_loader.js:2
didChangeAttributeForElement @ uxp://uxp-internal/domjs_scripts.js:2
didChangeAttributeForElement @ uxp://uxp-internal/domjs_scripts.js:2
didChangeAttribute @ uxp://uxp-internal/domjs_scripts.js:2
set value @ uxp://uxp-internal/domjs_scripts.js:2
set nodeValue @ uxp://uxp-internal/domjs_scripts.js:2
setAttribute @ uxp://uxp-internal/domjs_scripts.js:2
createElement @ uxp://uxp-internal/domjs_scripts.js:2
_appendElement @ uxp://uxp-internal/domjs_scripts.js:2
(anonymous) @ uxp://uxp-internal/domjs_scripts.js:2
we @ uxp://uxp-internal/domjs_scripts.js:2
_processToken @ uxp://uxp-internal/domjs_scripts.js:2
_processInputToken @ uxp://uxp-internal/domjs_scripts.js:2
_runParsingLoop @ uxp://uxp-internal/domjs_scripts.js:2
parse @ uxp://uxp-internal/domjs_scripts.js:2
t.parse @ uxp://uxp-internal/domjs_scripts.js:2
s @ uxp://uxp-internal/domjs_scripts.js:2
_loadHtmlContent @ uxp://uxp-internal/p…anager_scripts.js:1
loadMainFile @ uxp://uxp-internal/p…anager_scripts.js:1
loadDefaultMainFile @ uxp://uxp-internal/p…anager_scripts.js:1
bootstrap @ uxp://uxp-internal/p…anager_scripts.js:1
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="./vars/dist/spectrum-global.css">
<link rel="stylesheet" href="./typography/dist/index-vars.css">
<link rel="stylesheet" href="./page/dist/index-vars.css">
<link rel="stylesheet" href="./button/dist/index-vars.css">
<link rel="stylesheet" href="./icon/dist/index-vars.css">
<link rel="stylesheet" type="text/css" href="./styles.css">
<link rel="stylesheet" type="text/css" href="./jquery-ui.css">
<script src="./jquery.min.js"></script>
<script src="./index.js"></script>
</head>
<body>
<input type="text" size="S" id="myLength" style=" position: absolute; left: 153px; top: 190px;" value = "6000" onchange="setWidth()";> </input>
</body>
</html>
index.js
const batchPlay = require("photoshop").action.batchPlay;
const app = require('photoshop').app;
const UXP = require("uxp");
const fs = require('fs');
const fs1 = require("uxp").storage.localFileSystem;
var exeModal = require('photoshop').core.executeAsModal;
var doc = app.activeDocument;
var docWidth = doc.width;
var docHeight = doc.height;
// console.log("docWidth:", docWidth, "docHeight:", docHeight);
const showAlert = async (message) => {
await app.showAlert(message);
}
Please, can someone help?