Sha256: a50c38553ca0fe0ec2513dcdec3fc842f8786d514e6e34fbecb4e2278fd5d0d1
Contents?: true
Size: 451 Bytes
Versions: 74
Compression:
Stored size: 451 Bytes
Contents
# frozen_string_literal: true class Atome def html(obj = nil) if obj @html = obj else @html end end def to_px(particle) ruby_wasm_code = <<-JS var div = document.getElementById("#{@id}"); var style = window.getComputedStyle(div); var original_value = style.getPropertyValue("#{particle}"); var parsed_value = parseInt(original_value); return parsed_value; JS JS.eval(ruby_wasm_code).to_f end end
Version data entries
74 entries across 74 versions & 1 rubygems