add FunctionBase::trigger_htmx_event() with a string parameter
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010-2024, Tomasz Sowa
|
* Copyright (c) 2010-2026, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -1154,6 +1154,16 @@ void FunctionBase::trigger_htmx_event(const wchar_t * event_name, long value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FunctionBase::trigger_htmx_event(const wchar_t * event_name, const wchar_t * value)
|
||||||
|
{
|
||||||
|
if( cur->request->is_htmx_request )
|
||||||
|
{
|
||||||
|
pt::Space & trigger = cur->request->out_headers.get_add_space(L"HX-Trigger");
|
||||||
|
trigger.add(event_name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DEPRACATED
|
* DEPRACATED
|
||||||
* for backward compatibility
|
* for backward compatibility
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010-2024, Tomasz Sowa
|
* Copyright (c) 2010-2026, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -242,6 +242,7 @@ public:
|
|||||||
virtual void trigger_htmx_event(const wchar_t * event_name, bool value);
|
virtual void trigger_htmx_event(const wchar_t * event_name, bool value);
|
||||||
virtual void trigger_htmx_event(const wchar_t * event_name, int value);
|
virtual void trigger_htmx_event(const wchar_t * event_name, int value);
|
||||||
virtual void trigger_htmx_event(const wchar_t * event_name, long value);
|
virtual void trigger_htmx_event(const wchar_t * event_name, long value);
|
||||||
|
virtual void trigger_htmx_event(const wchar_t * event_name, const wchar_t * value);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user