(propName string, propVal any)
| 281 | } |
| 282 | |
| 283 | func P(propName string, propVal any) any { |
| 284 | if propVal == nil { |
| 285 | return map[string]any{propName: nil} |
| 286 | } |
| 287 | if propName == "style" { |
| 288 | strVal, ok := propVal.(string) |
| 289 | if ok { |
| 290 | styleMap, err := styleAttrStrToStyleMap(strVal, nil) |
| 291 | if err == nil { |
| 292 | return styleAttrMapWrapper{StyleAttrMap: styleMap} |
| 293 | } |
| 294 | log.Printf("Error parsing style attribute: %v\n", err) |
| 295 | return nil |
| 296 | } |
| 297 | } |
| 298 | return map[string]any{propName: propVal} |
| 299 | } |
| 300 | |
| 301 | func getHookFromCtx(ctx context.Context) (*VDomContextVal, *Hook) { |
| 302 | vc := getRenderContext(ctx) |
nothing calls this directly
no test coverage detected