Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2019-12

trigger an window resize event

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

warleyalex

I would like to trigger the window 'resize' event on window object. ...to so I had to specified the method dispatchEvent on the TJSWindow definition;

  TJSWindow = class external name 'Window' (TJSObject)
  (...)
    function dispatchEvent(evt: TJSEvent): Boolean;
  end;

now it's working for me.

  window.dispatchEvent( TJSEvent.new('resize') );

Reply by email