swiftui-multiplatform/ActionExtension-iOS/Action.js
2021-11-19 15:41:54 -05:00

21 lines
414 B
JavaScript

var Action = function() {};
Action.prototype = {
run: function(parameters) {
parameters.completionFunction({
"URL": document.URL,
"title": document.title,
"selection": document.getSelection().toString()
});
},
finalize: function(parameters) {
var customJavaScript = parameters["customJavaScript"];
eval(customJavaScript);
}
};
var ExtensionPreprocessingJS = new Action