Skip to content

Commit

Permalink
Make '_anywidget_id' arg mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
melff committed Dec 7, 2024
1 parent d3cb219 commit 1cfbf37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/R/widget-anywidget.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ AnyWidgetClass <- R6Class_("AnyWidget",
#' CountWidget(value=42)
#' }
#' @export
AnyWidget <- function(`_esm`,`_css`,...){
AnyWidget <- function(`_esm`,`_css`,`_anywidget_id`,...){
args <- list(...)
public <- list()
for(n in names(args)){
Expand All @@ -74,6 +74,8 @@ AnyWidget <- function(`_esm`,`_css`,...){
}
`_esm` <- as.character(`_esm`)
public[["_esm"]] <- structure(Unicode(`_esm`),sync=TRUE)
`_anywidget_id` <- as.character(`_anywidget_id`)
public[["_anywidget_id"]] <- structure(Unicode(`_anywidget_id`),sync=TRUE)
if(!missing(`_css`))
public[["_css"]] <- structure(Unicode(`_css`),sync=TRUE)
WidgetClass <- R6Class_(
Expand Down

0 comments on commit 1cfbf37

Please sign in to comment.