Phantom can not parse LESS
See original GitHub issueI am using webshot
to try to generate a screenshot of a website that is compiling LESS on the client machine. However this fails. webshot
uses Phantom.js
as an underlying mechanism.
For example when I target this Fiddle http://jsfiddle.net/Yhcz4/23/ I get the following Phantom error in the initFunctions
function (when I remove this line other unrelated errors pop up)
TypeError: 'undefined' is not a function (evaluating '_math.bind(null, Math[f], mathFunctions[f])')
What am I doing wrong. Or is Phantom JS simply not able to work with Less.js?
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (10 by maintainers)
Top Results From Across the Web
CasperJS "Syntax error: Parse error" - Stack Overflow
CasperJS "Syntax error: Parse error" ... I've looked up some possible explanations, I added the phantom.cookiesEnabled = true, but I simply can't figure...
Read more >Phantomjs does not exit if file has Parse Errors #10687 - GitHub
I'm not sure about the loader script, but I want to know is placing phantom.onError directly on the executing script, real_script.js in ths...
Read more >Data access automation API - Splunk Documentation
Why I can't access data from Splunk using REST API. ... phantom.collect(container, #this can be a container or an action results object ...
Read more >Phantom types in Swift - Swift by Sundell
This week, let's take a look at a technique that can let us leverage Swift's type system to perform data validation at compile...
Read more >Phantom Wallet Solana Tutorial - Complete Beginner's Guide ...
The content published on CoinSutra Channel is for informational, educational, and recreational purposes only and should not be considered to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into the exact same bug today and it seems to be related to this issue: https://github.com/ariya/phantomjs/issues/10522
tl; dr: the Webkit version used by PhantomJS is missing the
Function.prototype.bind
implementation.I suppose this is not triggered while testing less using PhantomJS simply because the
initFunctions()
function is not tested, and it is the only one usingbind()
.This seems to work for me: https://github.com/ariya/phantomjs/issues/10522#issuecomment-16125397
@RALifeCoach
It’s a “standard” ES5 polyfill script: es-5 shim (The link is right in the doc section @lukeapage pointed to).