Skip to content

inject onclick method in the embed iframe #24

@ronlinet

Description

@ronlinet

Has anybody managed to implement a JS onclick method in the embed iframe?
I have tried

$embed->setAttribute( ["onclick" => 'myMethod( ' . $video['id'] . ' )']);
and

$embed->setAttribute( ["onclick" => 'alert()']);
I see that in web inspector that the events are correctly injected to iframe html tags but I can't trigger even a simple alert.

I my case I want to add a listener for the player button ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions