Comments (3)
Is this necessary in addition to the ClosureCompiler blocks you've added to the plugin file itself?
from djax.
Yes.
In my WordPress plugin, I'm enqueueing two scripts - jquery.djax.js and foobar-djax.js.
The first can be minified correctly with the advanced closure compiler with the block that is currently included. All good.
My foobar-djax.js contains a call to djax()
- trying to minify this with the advanced closure compiler results in the djax()
call being dropped, as Google doesn't recognise it as a function name that must change (like the jQuery externs does with all of the standard jQuery functions), as it's defined outside of the file. The closure compiler block in my post above is what I would add to my foobar-djax.js so that, not only are the standard jQuery functions recognised, but the djax()
function is too.
If I had other jQuery plugins that added new functions, then I could add an @externs_url
for each of them.
from djax.
Makes sense to me. Just added the file to the repo.
from djax.
Related Issues (20)
- DOM replacement callbacks HOT 3
- Allow inline css and script tags to be updated. HOT 12
- how can i say dont use djax for target="blank" link HOT 2
- jQuery .click() handler not firing on DJAX-loaded page HOT 3
- scroll to location links within djax page HOT 4
- pjax wrapper? HOT 3
- Delay opening of page
- Load Script an CSS
- Bind unique links or something? HOT 5
- How do I use djax with this page? HOT 1
- Auto Update HTML Head Elements HOT 9
- External Link with the same URL HOT 3
- Extension .PHP is possible?
- Compatibility with internet explorer? HOT 1
- Djax $.get on an image HOT 3
- Has anyone got djax and iScroll to work well with each other?
- Code example mistake at homepage
- Grabbing full page HTM HOT 1
- Djax thrown off by exceptions with hyphens
- jQuery v3.1.1 Compatibility issue SOLVED
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djax.