Skip to content

Commit

Permalink
cleanup and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick committed Jun 21, 2024
1 parent 85cf71b commit 5c14d6b
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,15 @@ export const StimulusWithRef: Story = {
</qti-assessment-item>`
};

/* An example of how to use the qti-assessment-stimulus-ref component to load a stimulus and append it to a placeholder element */
export const StimulusDeliveryPlatform: Story = {
render: args => {
const placeholderRef = createRef<HTMLElement>();
return html` <div
@qti-assessment-stimulus-ref-connected=${async (e: Event) => {
e.preventDefault();
const stimulusRef = e.target as QtiAssessmentStimulusRef;
stimulusRef.loadAndAppendStimulus(placeholderRef.value);
// const path = stimulusRef.href.substring(0, stimulusRef.href.lastIndexOf('/'));
// const stimulus = await qtiTransformItem()
// .load(stimulusRef.href)
// .then(api => api.path(path).htmldoc());
// stimulusRef.appendChild(stimulus);
}}
>
<div class="qti-shared-stimulus" ${ref(placeholderRef)}></div>
Expand Down

0 comments on commit 5c14d6b

Please sign in to comment.