Berry add argument to werbserver.content_send_style (#23953)

This commit is contained in:
s-hadinger 2025-09-27 10:21:39 +02:00 committed by GitHub
parent 80f27d9cfc
commit 6325a9fb44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
### Changed
- ESP32 Platform from 2025.08.30 to 2025.09.30, Framework (Arduino Core) from v3.1.3.250808 to v3.1.4 and IDF from v5.3.3.250801 to v5.3.4.250826 (#23888)
- Use HAL instead of ROM for SHA HW acceleration as used by TLS (#23902)
- Berry add argument to `werbserver.content_send_style`
### Fixed

View File

@ -268,11 +268,17 @@ extern "C" {
be_raise(vm, kTypeError, nullptr);
}
// Berry: `webserver.content_send_style() -> nil`
// Berry: `webserver.content_send_style([style : string]) -> nil`
//
int32_t w_webserver_content_send_style(struct bvm *vm);
int32_t w_webserver_content_send_style(struct bvm *vm) {
WSContentSendStyle();
int32_t argc = be_top(vm); // Get the number of arguments
if (argc >= 1 && be_isstring(vm, 1)) {
const char * head_content = be_tostring(vm, 1);
WSContentSendStyle_P("%s", head_content);
} else {
WSContentSendStyle();
}
be_return_nil(vm);
}