shama / on-load

On load/unload events for DOM elements using a MutationObserver
113 stars 19 forks source link

on-load should be a no-op on the server #24

Closed toddself closed 7 years ago

toddself commented 7 years ago

In node, on-load shouldn't attempt to do anything since with later versions of bel (which use pelo), the returned result is a string and not a "DOM" object like in bel < 5.

This will fix shama/bel#80

toddself commented 7 years ago

@yoshuawuyts can we merge and publish this?

yoshuawuyts commented 7 years ago

@toddself I don't have any commit rights cc/ @shama

toddself commented 7 years ago

@shama -- anyway to merge this? i can't upgrade to bel 5.0 because server-side rendering keeps breaking because this is trying to run in the server.