mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-21 09:19:27 +02:00
* Namespaced PushJS API
This commit is contained in:
parent
3742d2d19f
commit
3c8da6f10c
3
packages/pushjs/namespaced/Api.PushJS.pas
Normal file
3
packages/pushjs/namespaced/Api.PushJS.pas
Normal file
@ -0,0 +1,3 @@
|
||||
{$DEFINE FPC_DOTTEDUNITS}
|
||||
unit Api.PushJS;
|
||||
{$include ../src/pushjs.pas}
|
@ -1,6 +0,0 @@
|
||||
rtl.module("PushJS",["System","JS"],function () {
|
||||
"use strict";
|
||||
var $mod = this;
|
||||
$mod.$rtti.$RefToProcVar("TPushFunction",{procsig: rtl.newTIProcSig(null)});
|
||||
$mod.$rtti.$RefToProcVar("TPushParamsFallback",{procsig: rtl.newTIProcSig([["payload",$mod.$rtti["TPushFallbackPayload"]]])});
|
||||
});
|
@ -16,7 +16,9 @@
|
||||
|
||||
{ Compact and cross-browser solution for Notifications API. }
|
||||
|
||||
{$IFNDEF FPC_DOTTEDUNITS}
|
||||
unit PushJS;
|
||||
{$ENDIF}
|
||||
|
||||
{$MODE OBJFPC}
|
||||
{$MODESWITCH EXTERNALCLASS}
|
||||
@ -24,7 +26,11 @@ unit PushJS;
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFDEF FPC_DOTTEDUNITS}
|
||||
JSApi.JS;
|
||||
{$ELSE}
|
||||
JS;
|
||||
{$ENDIF}
|
||||
|
||||
{ TODO:
|
||||
- Plugins: https://pushjs.org/docs/plugins }
|
Loading…
Reference in New Issue
Block a user