File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
apps/playground/src/instruments/examples/interactive/Interactive-With-Legacy-Script Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 " />
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6+ < title > Document</ title >
7+ </ head >
8+ < body >
9+ < h1 > Instrument</ h1 >
10+ < button type ="button " id ="submit-btn "> Submit</ button >
11+ </ body >
12+ </ html >
Original file line number Diff line number Diff line change 33import { defineInstrument } from '/runtime/v1/@opendatacapture/runtime-core' ;
44import { z } from '/runtime/v1/[email protected] ' ; 55
6+ import html from './index.html' ;
7+
68import './legacy.js?legacy' ;
79
810export default defineInstrument ( {
@@ -15,13 +17,12 @@ export default defineInstrument({
1517 tags : [ 'Legacy' , 'Internet Explorer 6' ] ,
1618 content : {
1719 render ( done ) {
18- const button = document . createElement ( 'button' ) ;
19- button . textContent = 'Submit Instrument' ;
20- document . body . appendChild ( button ) ;
20+ const button = document . getElementById ( 'submit-btn' ) ! ;
2121 button . addEventListener ( 'click' , ( ) => {
2222 done ( { message } ) ;
2323 } ) ;
24- }
24+ } ,
25+ html
2526 } ,
2627 clientDetails : {
2728 estimatedDuration : 1 ,
You can’t perform that action at this time.
0 commit comments