mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-14 18:20:11 +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. }
|
{ Compact and cross-browser solution for Notifications API. }
|
||||||
|
|
||||||
|
{$IFNDEF FPC_DOTTEDUNITS}
|
||||||
unit PushJS;
|
unit PushJS;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$MODE OBJFPC}
|
{$MODE OBJFPC}
|
||||||
{$MODESWITCH EXTERNALCLASS}
|
{$MODESWITCH EXTERNALCLASS}
|
||||||
@ -24,7 +26,11 @@ unit PushJS;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
{$IFDEF FPC_DOTTEDUNITS}
|
||||||
|
JSApi.JS;
|
||||||
|
{$ELSE}
|
||||||
JS;
|
JS;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{ TODO:
|
{ TODO:
|
||||||
- Plugins: https://pushjs.org/docs/plugins }
|
- Plugins: https://pushjs.org/docs/plugins }
|
Loading…
Reference in New Issue
Block a user