kevinokerlund / print-job Goto Github PK
View Code? Open in Web Editor NEWPrint an element on the page without the need for popup windows, or moving HTML around.
License: MIT License
Print an element on the page without the need for popup windows, or moving HTML around.
License: MIT License
print-job.js:85 Uncaught TypeError: Cannot read property 'add' of undefined
at c (print-job.js:85)
at Object.print (print-job.js:108)
at <anonymous>:1:10
Uncaught TypeError: Cannot read property 'match' of undefined
The body tag needs to be usable as a target for this library as it would allow functions to be used when printing the whole page.
The CSS that is applied:
html body > :not(.${STYLE_CLASSES.PARENT}):not(.${STYLE_CLASSES.BLANKET}) {
display: none !important;
}
does not take into account PRINT elements that are direct children of body
When trying to include the div-printer library in the body tab before the tag, the printer events do not fire correctly. They have the same issue as this question on StackOverflow.
For this library to work correctly currently, it must be included in the <head? tag.
CSS generation and attachment should be included in the JS file instead of requiring users to attach another CSS stylesheet as the CSS is relatively small. If the CSS were to be written in JSON format and then parsed into CSS, it would allow for easy readability, and editing.
Images on a web page should be as small as possible, but when a user wants to print a picture that is on the page, often a higher resolution image should be supplied.
This is due to the way we "blanket" the page. The original HTML content is still there, just covered, and not hidden (so it still takes up its height).
You can print a PDF file by adding an iframe to the page, and then calling .print
on the iFrame window.
Use webpack and babel
The testing framework will need to support a fake DOM.
Is there a framework around that allows mocking "print mode"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.