not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1004 B

  1. define(["sugar-web/env", "sugar-web/activity/activity"], function (env, activity) {
  2. // Manipulate the DOM only when it is ready.
  3. requirejs(['domReady!'], function (doc) {
  4. //
  5. // Initialize the python environment.
  6. compiler = RapydScript.create_embedded_compiler()
  7. // One event bus for all
  8. event_bus = riot.observable()
  9. // Setup custom script parser
  10. riot.parsers.js.Rapyd = function(js, options) {
  11. return (compiler.compile(js))
  12. }
  13. // Mount web components
  14. riot.compile(function() {
  15. // here tags are compiled and riot.mount works synchronously
  16. var tags = riot.mount('*')
  17. try {
  18. activity.setup()
  19. setTimeout(function(){
  20. event_bus.trigger('activity-ready', activity)
  21. }, 100)
  22. }
  23. catch(err) {
  24. // No datastore
  25. event_bus.trigger('activity-not-ready', err)
  26. }
  27. })
  28. });
  29. });