I would guess the Construct engine is doing something like creating a script to a blob: URL, which Facebook incorrectly blocks thinking it's unsafe (but it is safe).
I'm not sure where you got that code from, but the key function appears to be needsToBeBlacklisted, but its definition is not included. If you can find the code for that it should help identify the cause.