Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
<script>
function action(){}
</script>

<div use:action use:action />

Error compiling component

WebAssembly.instantiateStreaming(): value type opcode @+13
/* App.svelte generated by Svelte v3.32.0 */
import {
SvelteComponent,
action_destroyer,
detach,
element,
init,
insert,
noop,
run_all,
safe_not_equal
} from "svelte/internal";

function create_fragment(ctx) {
let div;
let action_action;
let action_action_1;
let mounted;
let dispose;

return {
c() {
div = element("div");
},
m(target, anchor) {
insert(target, div, anchor);

if (!mounted) {
dispose = [
action_destroyer(action_action = action.call(null, div)),
action_destroyer(action_action_1 = action.call(null, div))
];

mounted = true;
}
},
result = svelte.compile(source, {
generate: ,
});
/* Add a <style> tag to see the CSS output */
		
			
				
  • {
    • html: Fragment {...}
      • start: 41
      • end: 70
      • type: "Fragment"
      • children: [...] (2)
        • Text {...}
          • start: 39
          • end: 41
          • type: "Text"
          • raw: "\n\n"
          • data: "\n\n"
          }
        • Element {...}
          • start: 41
          • end: 70
          • type: "Element"
          • name: "div"
          • attributes: [...] (2)
            • Action {...}
              • start: 46
              • end: 56
              • type: "Action"
              • name: "action"
              • modifiers: []
              • expression: null
              }
            • Action {...}
              • start: 57
              • end: 67
              • type: "Action"
              • name: "action"
              • modifiers: []
              • expression: null
              }
            ]
          • children: []
          }
        ]
      }
    • css: undefined
    • instance: Script {...}
      • type: "Script"
      • start: 0
      • end: 39
      • context: "default"
      • content: Program {...}
        • type: "Program"
        • start: 8
        • end: 30
        • loc: {...}
          • start: {...}
            • line: 1
            • column: 0
            }
          • end: {...}
            • line: 3
            • column: 0
            }
          }
        • body: [...] (1)
          • FunctionDeclaration {...}
            • type: "FunctionDeclaration"
            • start: 10
            • end: 29
            • loc: {...}
              • start: {...}
                • line: 2
                • column: 1
                }
              • end: {...}
                • line: 2
                • column: 20
                }
              }
            • id: Identifier {...}
              • type: "Identifier"
              • start: 19
              • end: 25
              • loc: {...}
                • start: {...}
                  • line: 2
                  • column: 10
                  }
                • end: {...}
                  • line: 2
                  • column: 16
                  }
                }
              • name: "action"
              }
            • expression: false
            • generator: false
            • async: false
            • params: []
            • body: BlockStatement {...}
              • type: "BlockStatement"
              • start: 27
              • end: 29
              • loc: {...}
                • start: {...}
                  • line: 2
                  • column: 18
                  }
                • end: {...}
                  • line: 2
                  • column: 20
                  }
                }
              • body: []
              }
            }
          ]
        • sourceType: "module"
        }
      }
    • module: undefined
    }
The AST is not public API and may change at any point in time