Skip to content

Commit

Permalink
HNW/Feature: Listen for postMessage to author model
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBizzle committed May 24, 2024
1 parent d1f9a76 commit d67f62e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/beak/hnw-config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ recompile = ->

window.addEventListener('message', (e) ->
switch e.data.type
when "hnw-author-bundle"
{ hnwNlogo, ...bundle } = e.data.bundle
initialize(hnwNlogo, bundle)
when "hnw-author-pair"
initialize(e.data.nlogo, e.data.config)
when "new-breed-var"
addNewBreedVar(e.data.breed, e.data.var)
recompile()
Expand Down

0 comments on commit d67f62e

Please sign in to comment.