naja-js / naja

Modern AJAX library for Nette Framework
https://naja.js.org
MIT License
109 stars 15 forks source link

What is `snippet`'s type? #379

Closed zipper closed 7 months ago

zipper commented 1 year ago

The SnippetHandler.updateSnippet declares, that it recieves snippet as HTMLElement, but the events AfterUpdateEvent and BeforeUpdateEvent then have it declared as Element. Based on other code occurences (SnippetHandler.findSnippets where snippets are retrieved, type SnippetUpdateOperation, ...), I guess that the Element should be right.

Shouldn't there therefore be Element in updateSnippet method signature as well?

jiripudil commented 1 year ago

Hi, yes, you're probably right. Could you please send a PR?