File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed
test/htmlx2jsx/samples/sapper-noscroll Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -355,13 +355,14 @@ export function convertHtmlxToJsx(
355355 //if we are on an "element" we are case insensitive, lowercase to match our JSX
356356 if ( parent . type == 'Element' ) {
357357 //skip Attribute shorthand, that is handled below
358+ const sapperNoScroll = attr . name === 'sapper:noscroll' ;
358359 if (
359360 attr . value !== true &&
360361 ! (
361362 attr . value . length &&
362363 attr . value . length == 1 &&
363364 attr . value [ 0 ] . type == 'AttributeShorthand'
364- )
365+ ) || sapperNoScroll
365366 ) {
366367 let name = attr . name ;
367368 if ( ! svgAttributes . find ( ( x ) => x == name ) ) {
Original file line number Diff line number Diff line change 697697 onrejectionhandled ?: EventHandler < PromiseRejectionEvent , Window > ;
698698 }
699699
700+ interface SapperAnchorProps {
701+ sapperNoscroll ?: true ;
702+ }
703+
700704 interface IntrinsicElements {
701705 // HTML
702- a : HTMLProps < HTMLAnchorElement > ;
706+ a : HTMLProps < HTMLAnchorElement > & SapperAnchorProps ;
703707 abbr : HTMLProps < HTMLElement > ;
704708 address : HTMLProps < HTMLElement > ;
705709 area : HTMLProps < HTMLAreaElement > ;
Original file line number Diff line number Diff line change 1+ < > < a sapperNoscroll > </ a > </ >
Original file line number Diff line number Diff line change 1+ <a sapper:noscroll ></a >
You can’t perform that action at this time.
0 commit comments