We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opt_whenDone
Original issue: canjs/canjs/issues/2706 Dependent on: canjs/bit-docs-html-canjs/issues/189
The prettyPrint method takes a couple of parameters, the first of which is a function to be executed when the prettifying is complete. (See here).
prettyPrint
Where we call the prettyPrint method, we could provide a return value of a Deferred which is resolved within prettyPrint's done callback.
Something like:
require('./prettify-engine'); require('./prettify.less'); var $ = require('jquery'); module.exports = function () { var doneDeferred = $.Deferred(); var codes = document.getElementsByTagName('code'); for (var i = 0; i < codes.length; i++) { var code = codes[i]; if (code.parentNode.nodeName.toUpperCase() === 'PRE') { code.className = code.className + ' prettyprint'; } } prettyPrint(function(){ doneDeferred.resolve(); }); return doneDeferred; };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Original issue: canjs/canjs/issues/2706
Dependent on: canjs/bit-docs-html-canjs/issues/189
The
prettyPrint
method takes a couple of parameters, the first of which is a function to be executed when the prettifying is complete. (See here).Where we call the prettyPrint method, we could provide a return value of a Deferred which is resolved within prettyPrint's done callback.
Something like:
The text was updated successfully, but these errors were encountered: