edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [edbrowse-dev] GCS and never-referenced style props
@ 2019-09-08 23:28 Kevin Carhart
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Carhart @ 2019-09-08 23:28 UTC (permalink / raw)
  To: Edbrowse-dev


Sorry, I have an obligatory glitch in that email, I always do that.  When 
I wrote...

> The code that raises an error is, and the error is that it's illegal to
> call split on not a valid string.

I intended to include the code at the appropriate spot.  The code 
that raises the error is:
var a = window.getComputedStyle(e), s = a[Hr + 'Delay'].split(', ')

And the error itself is TypeError, cannot read property 'split' of 
undefined



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edbrowse-dev] GCS and never-referenced style props
  2019-09-08 23:50 ` Karl Dahlke
@ 2019-09-09  0:48   ` Kevin Carhart
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Carhart @ 2019-09-09  0:48 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev


Thanks, 1298 looks like the place.

> Is there any spec on this or are we just winging it?

Well, the Mozilla CSS reference lists the transition properties among 
their basic "here are the CSS properties" A-Z list, but we can just 
implement a few,

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference





On Sun, 8 Sep 2019, Karl Dahlke wrote:

> Is this like what I have at startwindow.js line 1298?
> I added that because of an acid test but there might be others.
> I hope not "hundreds".
> If there are a lot we should think about putting them in the prototype, in a clever way, maybe.
> CSSStyleDeclaration.prototype.transitionDelay = "";
> Such could be overwritten per style object of course, but we'd have to be careful.
> Is there any spec on this or are we just winging it?
>
> Karl Dahlke
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [edbrowse-dev] GCS and never-referenced style props
  2019-09-08 23:23 Kevin Carhart
@ 2019-09-08 23:50 ` Karl Dahlke
  2019-09-09  0:48   ` Kevin Carhart
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2019-09-08 23:50 UTC (permalink / raw)
  To: Edbrowse-dev

Is this like what I have at startwindow.js line 1298?
I added that because of an acid test but there might be others.
I hope not "hundreds".
If there are a lot we should think about putting them in the prototype, in a clever way, maybe.
CSSStyleDeclaration.prototype.transitionDelay = "";
Such could be overwritten per style object of course, but we'd have to be careful.
Is there any spec on this or are we just winging it?

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [edbrowse-dev] GCS and never-referenced style props
@ 2019-09-08 23:23 Kevin Carhart
  2019-09-08 23:50 ` Karl Dahlke
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Carhart @ 2019-09-08 23:23 UTC (permalink / raw)
  To: Edbrowse-dev


Thanks Karl for mentioning dberr.  This helped with a problem in ontimer 
code that was hard to locate.  Thanks to dberr, I got a real line 
number and went right to the error.  Now that I know what I'm trying to 
work on, I'd like to run a resolution past you.

Here's the situation.  Assume the string Hr = 'transition';

The code that raises an error is, and the error is that it's illegal to 
call split on not a valid string.

var a = window.getComputedStyle(e), s = a[Hr + 'Delay'].split(', ')

I'm assuming these two statements are related because the second statement 
is called on a, the return value of the first.  So I read this to say that 
after gcs is called, the program assumes it can have free reign to 
reference transitionDelay and other properties and assume they are 
strings.

I checked in Firefox, and an object returned from gcs has about 500 
different style properties with the default value "", including:
transition: ""
transitionDelay: ""
transitionDuration: ""
transitionProperty: ""
transitionTimingFunction: ""


Karl, is there a best place to set this up, such as in createElement or 
getComputedStyle?  And do you think I should set up hundreds, or just set 
up the ones I know are referenced and do more when a program tries to find 
them?  The latter would mean that we should bear in mind that this can be 
a major reason for runtime errors-- maybe it's better to set up the whole 
A-Z slate now.

thanks
Kevin



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-09  0:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-08 23:28 [edbrowse-dev] GCS and never-referenced style props Kevin Carhart
  -- strict thread matches above, loose matches on Subject: below --
2019-09-08 23:23 Kevin Carhart
2019-09-08 23:50 ` Karl Dahlke
2019-09-09  0:48   ` Kevin Carhart

edbrowse-dev - development list for edbrowse

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/edbrowse-dev

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 edbrowse-dev edbrowse-dev/ http://inbox.vuxu.org/edbrowse-dev \
		edbrowse-dev@edbrowse.org
	public-inbox-index edbrowse-dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.edbrowse.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git