[Solved] Import class? lazarus / 76-Pas2JS ---------------------------------------------------------------------- Trenatos · 2019-06-05 14:14 I just grabbed pas2js 1.4.6 for Windows and giving it a whirl. I'm trying to import a class defined elsewhere, as in the Wiki example (http://wiki.freepascal.org/pas2js), but it's not compiling. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program hello; uses        browserconsole; type TJSFunction = class external name 'User'(TJSObject)        private         public                procedure sayHi(_name:String);        end;  begin        WriteLn(sayHi('Marcus'));end. This is the error Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i hello.pas(8,30) Error: Expected "," or ":"Fatal: Compilation aborted ---------------------------------------------------------------------- Trenatos · 2019-06-05 15:36 If anyone else runs into this, the solution is to add the externalclass modeswitch Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$ModeSwitch externalclass}