Skip to content
This repository has been archived by the owner on Mar 23, 2018. It is now read-only.

TypeError: Function.caller used to retrieve strict caller when using onload #9

Closed
arturi opened this issue Feb 27, 2017 · 2 comments
Closed

Comments

@arturi
Copy link
Contributor

arturi commented Feb 27, 2017

Thanks for your work, love this transform! Exactly what I needed for http://github.com/transloadit/uppy. I recently created an issue asking if using yo-yoify as a Babel transform was possible choojs/nanohtml#65, then made yo-yoify-standalone, which just wraps original yo-yoify and pipes the parsed version out. And then stumbled upon your babel-plugin-yo-yoify :)

The issue mentioned here, which is resolved by original yo-yoify browserify transform, however, remains: I get TypeError: Function.caller used to retrieve strict caller (in Safari) when running a bundle where onload has been used on an element.

I’ve noticed you are parsing onload attributes somehow, but can’t figure out what how exactly yo-yoify “transforms any Function.caller into plain strings”.

screen shot 2017-02-26 at 10 45 26 pm

@goto-bus-stop
Copy link
Owner

Thanks for the report! Turns out there's an undocumented parameter in on-load that can be used to identify elements, so now babel-plugin-yo-yoify will pass a unique ID into it for each different element.

@arturi
Copy link
Contributor Author

arturi commented Feb 27, 2017

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants