mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
Handle invalid attribute functions
This commit is contained in:
@@ -2243,7 +2243,7 @@ fn populateElementAttributes(self: *Page, element: *Element, list: anytype) !voi
|
|||||||
// We may have found an event handler.
|
// We may have found an event handler.
|
||||||
if (has_on_prefix) {
|
if (has_on_prefix) {
|
||||||
// Must be usable as function.
|
// Must be usable as function.
|
||||||
const func = try self.js.stringToPersistedFunction(attr.value.slice());
|
const func = self.js.stringToPersistedFunction(attr.value.slice()) catch continue;
|
||||||
|
|
||||||
// Longest known listener kind is 32 bytes long.
|
// Longest known listener kind is 32 bytes long.
|
||||||
const remaining: u6 = @truncate(name.len -| 2);
|
const remaining: u6 = @truncate(name.len -| 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user