File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
tests/runtime-runes/samples/custom-element-attributes Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ export function is_element_node(node) {
2626 * @returns {boolean }
2727 */
2828export function is_custom_element_node ( node ) {
29- return node . type === 'RegularElement' && ( node . name . includes ( '-' ) || node . attributes . some ( ( attr ) => attr . type === 'Attribute' && attr . name === 'is' ) ) ;
29+ return (
30+ node . type === 'RegularElement' &&
31+ ( node . name . includes ( '-' ) ||
32+ node . attributes . some ( ( attr ) => attr . type === 'Attribute' && attr . name === 'is' ) )
33+ ) ;
3034}
3135
3236/**
Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ import { test } from '../../test';
33export default test ( {
44 mode : [ 'client' , 'server' ] ,
55 async test ( { assert, target } ) {
6- const my_element = /** @type HTMLElement & { object: { test: true }; } */ ( target . querySelector ( 'my-element' ) ) ;
7- const my_link = /** @type HTMLAnchorElement & { object: { test: true }; } */ ( target . querySelector ( 'a' ) ) ;
6+ const my_element = /** @type HTMLElement & { object: { test: true }; } */ (
7+ target . querySelector ( 'my-element' )
8+ ) ;
9+ const my_link = /** @type HTMLAnchorElement & { object: { test: true }; } */ (
10+ target . querySelector ( 'a' )
11+ ) ;
812 assert . equal ( my_element . getAttribute ( 'string' ) , 'test' ) ;
913 assert . equal ( my_element . hasAttribute ( 'object' ) , false ) ;
1014 assert . deepEqual ( my_element . object , { test : true } ) ;
You can’t perform that action at this time.
0 commit comments