The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Weasel::WidgetHandlers - Mapping elements to widget handlers

VERSION

0.01

SYNOPSIS

  use Weasel::WidgetHandlers qw( register_widget_handler );

  register_widget_handler(
    'Weasel::Widgets::HTML::Radio', # Perl class handler
    'HTML',                         # Widget group
    tag_name => 'input',
    attributes => {
       type => 'radio',
    });

  register_widget_handler(
    'Weasel::Widgets::Dojo::FilteringSelect',
    'Dojo',
    tag_name => 'span',
    classes => ['dijitFilteringSelect'],
    attributes => {
       role => 'presentation',
       ...
    });

FUNCTIONS g =over

register_widget_handler($handler_class_name, $group_name, %conditions)

Registers $handler_class_name to be the instantiated widget returned for an element matching %conditions into $group_name.

Weasel::Session can select a subset of widgets to be applicable to that session by adding a subset of available groups to that session.

best_match_handler_class($driver, $_id, $groups)

Returns the best matching handler's class name, within the groups listed in the arrayref $groups, or undef in case of no match.

When $groups is undef, all registered handlers will be searched.

When multiple handlers are considered "best match", the one last added to the group last mentioned in $groups is selected.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 50:

'=item' outside of any '=over'