JSFiddle - React, Tailwind, and code Playground

HTML

<div style="page-break-after: always;page-break-before: always;page-break-inside: avoid;">Test</div>

JavaScript

( function() {
	const div = document.querySelector( 'div' );
  // Not working
	console.log( div.style.pageBreakAfter,
  	div.style.pageBreakBefore,
    div.style.pageBreakInside );
  // Working
  console.log( getComputedStyle( div )[ 'page-break-after' ],
  	getComputedStyle( div )[ 'page-break-before' ],
    getComputedStyle( div )[ 'page-break-inside' ] );
}() );