crabbly / crabbly/Print.js

Title: Still get "Invalid HTML element id: [object NodeList]" when printing NodeList in v1.6.0

Open
#684 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.5k
Forks
688
PR merge metrics
No merged PRs in 30d

Description

Content:

Dear author,

I'm using print.js v1.6.0 to print a NodeList object directly like below:

```
const list = document.querySelectorAll('.className');

printJS({
printable: list,
type: 'html'
});
```
However, I'm still getting the error "Invalid HTML element id: [object NodeList]" when trying to print.

I've tried:

Upgrading print.js to the latest v1.6.0
Getting NodeList via different methods like getElementByTagName
Simplifying the NodeList to just one element
Printing different types of elements like div, p etc.
But the issue persists. As per the v1.6.0 documentation, print.js should support directly printing NodeList without converting to array.

Could you please help look into this issue? Let me know if any other details are needed. Any help would be greatly appreciated.

Thank you!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.