When using the ES6 class definition syntax in the scope of a function, it looks like static definitions might not quite work. I am not 100% sure what the exact trigger is, but I do have a case right now that consistently fails.
Steps to Reproduce:
1. Open Safari.
2. Visit <http://milk.com/mimu/awkward-js-music/>.
Embedded canvases should be rendered, and "play / pause" button should work.
Message to console: "ReferenceError: Can't find variable: StyleUtil -- cloneComputedStyle -- StyleUtil.js:39"
Notably, the line that is being complained about is within the definition of the class StyleUtil. Given that cloneComputedStyle does exist in that class, the lookup should not ever fail.
I'm continuing development of the code. Here's a snapshot of the source as of this report: <https://github.com/danfuzz/mimu/tree/6042dc4014211eed2ba75354e5ed5361b998f07a>
Three items of note:
* This bug showed up after I wrapped the definition of the class in a function definition (as part of a conversion to RequireJS).
* The code as currently written works in Chrome. It doesn't work in FireFox in that FireFox doesn't do the ES6 class syntax at all yet (at least not in the release build).
* If you clone the source locally and view the index.html file in Safari, then *sometimes* the bug will show up, and sometimes the page will operate properly.
Here's the version of StyleUtil.js in question: <https://github.com/danfuzz/mimu/blob/6042dc4014211eed2ba75354e5ed5361b998f07a/lib/StyleUtil.js>
Looks like this works now in trunk (and Safari Technology Preview / WebKit Nightly if you want to verify).
I believe this was the Class Name Scope change, since it looks like that is what was on line 39 (accessing the Class's Name from inside the class's block). Though I think that was, maybe you had tested in Safari and not a WebKit Nightly at the time.
ES6 class syntax should use block scoping
*** This bug has been marked as a duplicate of bug 142567 ***