Expand my Community achievements bar.

SOLVED

NativePDF: How to access the 'lang' attribute from the merged HTML file

Avatar

Level 1

Using JavaScript I would like to find out what the 'lang' attribute variable is set to. I have used:

  • document.getAttribute('lang').value;
  • document.head.parentNode.getAttribute('lang').value;
  • document.body.parentNode.getAttribute('lang').value;
  • document.querySelector('html').getAttribute('lang').value;

without success.

 

Is it possible and if so, how do I get the value?

 

Thanks in advance

 

Tony

1 Accepted Solution

Avatar

Correct answer by
Employee

Hello @THoltham ,

 

Can you please try to use below :

document.documentElement.getAttribute('lang');

Please let me know if this solution works.

 

Thanks,

Prashant

 

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hello @THoltham ,

 

Can you please try to use below :

document.documentElement.getAttribute('lang');

Please let me know if this solution works.

 

Thanks,

Prashant