HeapsIO/domkit

domkit css parsing support broken in javascript

bh213 opened this issue · 3 comments

bh213 commented

When using latest heaps and domkit, hashlink version works correctly while javascript css file parsing produces no rules.

I believe this was caused by 21c751a and I think that the issue is in this line as all classes are recognized as erased.

if( c.className == ERASED ) {

Didn't debug too deep so details might be wrong. Example:

This works:
https://github.com/bh213/heaps-domkit-sample

and this one does not (js only, hl works for both):
bh213/heaps-domkit-sample@ce416aa

Thanks for reporting.
Does changing Identifier.isDefined() to this != #if hl 0 #else null #end; work ?

bh213 commented

I tried and it didn't solve the issue. If I removed the whole block (below) then at least some css got applied through I got a lot of invalid css errors. Before it is like there is no css content at all (js, hashlink is completely fine)

for( c in classes.copy() )
  if( c.className == ERASED ) {
	  classes.remove(c);
	  if( classes.length == 0 )
		  rules.pop();
bh213 commented

This is the issue, isDefined didn't even get called. Your change probably still needs to be applied though:

if( this == 0 ) {