Steven Orvell
c10629f72a
Update types
2018-01-29 17:51:40 -08:00
Steven Orvell
d26bb055d6
Add accomodation for HTMLImports polyfill.
2018-01-29 16:37:02 -08:00
Steven Orvell
5e185d5f07
Merge branch 'master' into 5017-kschaaf-custom-style
2018-01-29 16:01:52 -08:00
Steve Orvell
a73fdd72dc
Merge pull request #5035 from Polymer/4458-kschaaf-basic-templatizer
...
Allow templatizer to be used without owner or host prop forwarding. Fixes #4458
2018-01-29 11:10:49 -08:00
Steven Orvell
faad330092
2.4.0
2018-01-26 11:12:31 -08:00
Steve Orvell
6c5aac0577
Merge pull request #5055 from Polymer/edge-16
...
Add Edge 16 Testing
2018-01-19 16:50:03 -08:00
Steve Orvell
2719a9d6d3
[ProperitesChanged] Fix deserialization ( #4996 )
...
* [ProperitesChanged] Fix deserialization
A change merged with the `basic-element` caused the `type` argument to `_deserializeValue` to be called as a function to determine the deserialized output. This was an unintended breaking change from master and is reverted here. For example, the `basic-element` change regressed using a class constructor as a property type.
* Remove cruft
* Update docs
* Test verbose wct output on firefox
* Avoid Chrome and FF running in parallel on Travis to avoid timeouts.
2017-12-20 14:07:21 -08:00
Steven Orvell
35e3c54b9b
Apply listeners in constructor rather than ready
...
Fixes #4394 . This change allows elements to have "first crack" at their own events (via the `listeners` object) before handlers registered via `on-*` see events. This is both more expected and fixes an inconsistency with 1.x.
2017-12-11 17:43:49 -08:00
Steven Orvell
c8acc183c2
Replace disconnectedCallback stub since this change is breaking.
2017-12-11 11:44:13 -08:00
Steven Orvell
1b514b4f9b
Minor fixes
...
* [PropertiesChanged]: check for and call `super.attributeChangedCallback`
* [PropertiesMixin]:
* remove `disconnectedCallback` stub.
* Improve comments
2017-12-11 11:11:12 -08:00
Steven Orvell
ed1454d628
Minor updates based on review.
2017-11-30 15:25:50 -08:00
Steven Orvell
d3e1bae48a
Merge branch 'master' into basic-element
2017-11-29 16:49:07 -08:00
Steven Orvell
40f02ea178
Remove PropertiesElement in favor of PropertiesMixin.
2017-11-29 16:33:44 -08:00
Steven Orvell
8af148003a
FIx typo
2017-11-29 13:56:23 -08:00
Steven Orvell
a1bd9a4fda
Skip test in old browsers.
2017-11-29 11:48:51 -08:00
Steven Orvell
8d57a6e91d
Remove propertyNameForAttribute since it's never needed.
2017-11-29 11:01:02 -08:00
Steven Orvell
e09285dbf1
Fix subclassing and simplify.
2017-11-29 10:42:09 -08:00
Steven Orvell
603123e168
Move property<->attribute case mapping to PropertiesChanged.
2017-11-29 10:25:09 -08:00
Steve Orvell
c42199c67d
Merge pull request #4942 from Polymer/3626-kschaaf-repeat-refresh
...
Ensure re-sort/filter always happens after array item set. Fixes #3626
2017-11-21 17:19:16 -08:00
Steven Orvell
581483f2b4
Fix typo.
2017-11-21 16:23:26 -08:00
Steve Orvell
1796c74270
Merge pull request #4941 from Polymer/4897-kschaaf-docs
...
Clarify docs on target-framerate. Fixes #4897
2017-11-21 11:38:00 -08:00
Steven Orvell
80a7f1e57d
Comment reworded based on feedback.
2017-11-21 11:36:24 -08:00
Steve Orvell
3a0c3967b7
Merge pull request #4950 from kant/patch-2
...
Semantic issue (proposal) plus minor fixes
2017-11-21 11:24:42 -08:00
Steven Orvell
82cf96bb6b
Update tests
...
* Add test for implementing `observedAttributes`
* Remove call to `super.id` for legacy browser support.
2017-11-20 17:16:02 -08:00
Steven Orvell
feac932859
[PropertiesMixin] Fix mapping property names from attributes
...
* make static: propertyNameForAttribute, attributeNameForProperty, typeForProperty
* method that take classes should consistently use `constructor` as the arg name.
* when using `properties`, the property name for a given attribute is discovered using the names in `properties` and reverse mapping the `attributeNameForProperty` attribute.
2017-11-20 14:41:07 -08:00
Steven Orvell
c56f74f993
Add test for observing id attribute.
2017-11-16 17:52:59 -08:00
Steven Orvell
4b9170ab24
Cleanup based on review.
2017-11-16 17:12:53 -08:00
Steven Orvell
8d24c212e2
Fix deserializing dates.
2017-11-16 14:30:00 -08:00
Steven Orvell
a7b46b156e
Factoring improvements around attribute serialize/deserialize
2017-11-16 14:25:16 -08:00
Steven Orvell
fb0f90bc6b
Remove crufty comment.
2017-11-15 16:43:37 -08:00
Steven Orvell
e8c27671da
Lint fix
2017-11-15 11:51:35 -08:00
Steven Orvell
1e903a947d
Add tests for setting custom attribute name
2017-11-15 11:35:39 -08:00
Steven Orvell
74fb51512b
Expose less protected data.
...
* Hide _own* getters since they are unnecessary
* declared properties always have accessors unless they would stomp existing accessors (or have property effects)
2017-11-15 11:09:14 -08:00
Steven Orvell
08c3a02eaf
Prep for processing of shady-unscoped moving to ShadyCSS
2017-11-13 11:29:27 -08:00
Steven Orvell
d331c673fc
Merge branch 'master' into basic-element
2017-11-10 17:04:15 -08:00
Steven Orvell
0fe9434fd7
ElementMixin uses PropertiesMixin for
...
* finalization
* creating properties
2017-11-10 16:51:13 -08:00
Steven Orvell
3c50f44aa9
PropertiesMixin
...
* automatically finalizes superclasses.
* automatically mixes superclass properties.
2017-11-10 16:45:48 -08:00
Steven Orvell
5846d5825b
PropertyAccessors
...
Update based on `PropertiesChanged` changes
2017-11-10 14:54:19 -08:00
Steven Orvell
05cb5d2cb0
PropertiesChanged
...
* Integrate serializeValue fromPropertyAccessors.
* createProperties now takes an object rather than an array.
* ready always calls `flushProperties`.
* flushProperties only does work if changes are pending.
2017-11-10 14:53:07 -08:00
Steven Orvell
9a4683354f
Fix tests on Firefox.
2017-10-19 15:12:11 -07:00
Steven Orvell
1c5b731ffb
Update externs again.
2017-10-19 14:57:51 -07:00
Steven Orvell
8683b27c07
Update externs.
2017-10-19 14:53:04 -07:00
Steven Orvell
092b210ffa
Lint fixes
2017-10-19 14:51:14 -07:00
Steven Orvell
819652eb9f
Allow style elements to be separate in the element template.
...
Previously Polymer collapsed any included shared styles into 1 style element. This prevents the browser from recognizing shared style elements as similar and optimizing them. With this change, we no longer collapse styles. Note, included styles are still currently collapsed by ShadyCSS but the polyfill will likely not do this in the future.
2017-10-19 12:56:30 -07:00
Steven Orvell
982d28c6bc
Lint fix.
2017-10-18 16:59:09 -07:00
Steven Orvell
d77e073eb9
Add support for styles with a shady-unscoped attribute
...
This is being added to 1.x and it's ported forward here so it can be used in hybrid mode.
2017-10-18 16:49:49 -07:00
Steven Orvell
1b50194440
Force literal true` to be set as an attribute with a value of empty string.
2017-10-11 15:34:12 -07:00
Steven Orvell
c91b9d19db
Better attribute suppport
...
* Moves _propertyToAttribute to PropertiesChanged
* PropertiesMixin supports `attribute` in the `properties` object to define an attribute name.
2017-10-06 16:42:31 -07:00
Steve Orvell
6af12ac1af
Merge pull request #4841 from Polymer/exclude-style-script-bindings
...
Exclude script and style tags for parsing bindings
2017-09-21 16:57:40 -07:00
Steven Orvell
946aad5caa
Lint fixes.
2017-09-21 14:49:18 -07:00
Steven Orvell
e3e128bade
Renamed basic element to properties element
...
Exposed `PropertiesMixin` also.
2017-09-21 14:35:12 -07:00
Steve Orvell
b31c333e8c
Merge pull request #4849 from Polymer/custom-style-copy-to-main-document
...
Copy <custom-style> styles to main document
2017-09-20 17:41:24 -07:00
Steven Orvell
d26955b46e
Implement basic-element with properties-changed
...
Moves basic property creation and attribute deserialization into properties changed to make it suitable as a base for basic-element.
2017-09-15 19:16:23 -07:00
Steven Orvell
b8fd241afa
Fix lint issues
2017-09-15 15:38:24 -07:00
Steven Orvell
152f896feb
Improve docs and add test for case conversion.
2017-09-15 14:05:32 -07:00
Steven Orvell
dcdb750ba3
Add test to runner.
2017-09-15 11:53:35 -07:00
Steven Orvell
717a4f41a4
Adds Polymer.BasicElement
...
Provides minimal element starting point using PropertyAccessors to create properties using a properties object similar to Polymer.Element. No template or binding support is provided.
2017-09-15 11:43:27 -07:00
Steven Orvell
aa4f186e57
Factor PropertiesChanged out of PropertyAccessors
...
To improve code hygiene and extensibility, factors the basic batched `_propertiesChanged` mechanism out of `PropertyAccessors` which deals with creating accessors and sync'ing with attributes.
2017-09-15 11:05:21 -07:00
Steven Orvell
c7b43f78cd
Add accessor property to properties object
...
This forces a property listed in `properties` to create a property accessor regardless of whether or not it is needed for effects. This allows using `_propertiesChanged` to process changes for properties that may not have effects.
2017-09-15 10:54:58 -07:00
Steven Orvell
e91b6a7579
Factor to treeshake better
2017-09-15 10:33:49 -07:00
Steve Orvell
21ff47184e
Merge pull request #4837 from Polymer/no-cast-in-return
...
No cast in return
2017-09-12 17:42:13 -07:00
Steve Orvell
4a2d427f5d
Merge pull request #4829 from Polymer/optional-passive-gestures
...
App-level support for passive gesture touch listeners
2017-09-11 15:03:01 -07:00
Steve Orvell
7ca8e20079
Merge pull request #4737 from Polymer/fix-composed-path-tap
...
Fix event path for tap event on touch
2017-07-18 12:50:40 -07:00
Steven Orvell
2daf9de223
Update LegacyElementMixin.distributeContent
...
This should no longer be needed and is provided only for backwards compatibility.
2017-07-14 15:02:19 -07:00
Steven Orvell
c96350b47a
Remove crufty test
...
Remove test based on ShadyDOM api that does not exist.
2017-07-14 13:17:49 -07:00
Steve Orvell
0b23e746bf
Merge pull request #4684 from Polymer/closure-warnings
...
Closure warnings
2017-07-13 12:21:53 -07:00
Steve Orvell
af12e297df
Merge pull request #4676 from Polymer/fix-4650
...
dom-repat: set path when an observed path changes.
2017-06-13 10:18:21 -07:00
Steve Orvell
fdc0eff054
Merge pull request #4648 from Polymer/4643-kschaaf-binding-whitespace
...
Fix parsing for argument whitespace. Fixes #4643 .
2017-06-08 18:38:39 -07:00
Steven Orvell
bdbbfa1978
Remove unused __needFullRefresh
2017-06-08 17:29:30 -07:00
Steven Orvell
22d27aa087
Fixes #4650 : if an observed path changes, the repeat should render but in addition, the path should be notified. This is necessary since “mutableData” is optional.
2017-06-07 17:50:27 -07:00
Steve Orvell
2bc9448c31
Merge pull request #4672 from Polymer/settings
...
Add lib/utils/settings.html to hold legacy settings and rootPath
2017-06-06 10:35:11 -07:00
Steve Orvell
49cb5c4dc5
Merge pull request #4633 from Polymer/shadyChildrenObserver
...
Fix typo in prop of FlattenedNodesObserver
2017-05-30 16:47:20 -07:00
Steve Orvell
1b03448fe0
Merge pull request #4623 from Polymer/4597-kschaaf-contentForTemplate
...
Fix impl of _contentForTemplate. Add template-stamp tests.
2017-05-26 18:47:33 -07:00
Steve Orvell
520407e9ca
Merge pull request #4608 from Polymer/fix-4601
...
Ensure data flows correctly when enabling properties when client elements have already enabled
2017-05-25 14:04:34 -07:00
Steven Orvell
c0a816f676
Fix some ElementMixin warnings.
2017-05-24 19:19:47 -07:00
Steven Orvell
0744364514
fix dom-module related errors
2017-05-24 18:00:01 -07:00
Steven Orvell
c34ef0b2d8
reduce closure warnings in TemplateStamp
2017-05-24 17:37:58 -07:00
Steven Orvell
39877086c7
Improve comment more
2017-05-22 18:06:05 -07:00
Steven Orvell
fa1469a939
Improve comment
2017-05-22 18:05:35 -07:00
Steven Orvell
250067b389
Add comment.
2017-05-22 17:53:52 -07:00
Steven Orvell
8e8692f70c
* Improve clarity: change __dataInitialized to __dataReady
...
* When `_flushClients` is called, ensure that clients are always enabled or flushed as appropriate. This ensures that (1) clients that are enabled before the host is enabled flush properly, and (2) clients that are stamped but not enabled properly enable when the host flushes.
2017-05-22 17:51:15 -07:00
Steven Orvell
06df53d998
Fixes #4601 . Client elements can be readied that have already enabled properties. This can happen when templatize is used to create instances with no properties. In this case, in order for properties to flush properly to clients, clients must be flushed.
2017-05-17 17:00:33 -07:00
Steve Orvell
580c04034e
Merge pull request #4599 from Polymer/ready-reentrancy-fix2
...
Adds `_enableProperties` and prevents readying from re-entering
2017-05-12 19:55:43 -07:00
Steven Orvell
b943aa0d0b
[skip ci] doc fixes
2017-05-12 19:52:57 -07:00
Steven Orvell
4eb252fefd
Docs and slight renaming.
2017-05-12 15:29:55 -07:00
Steven Orvell
1f83fd7ce0
Add tests.
2017-05-12 15:12:52 -07:00
Steven Orvell
2f1e964c1f
Turn on accessors (via __dataInitialized) only after clients have completely flushed.
2017-05-12 12:30:59 -07:00
Steven Orvell
c6f9b31578
Adds _enableProperties as a new entry point that must be called to turn on properties. Prevents a bug where _readyClients can be called twice.
2017-05-12 11:50:27 -07:00
Steve Orvell
1eec6a28bb
Merge pull request #4593 from Polymer/static-fx
...
Add static API for creating property fx and minor code refactoring.
2017-05-11 17:38:39 -07:00
Steve Orvell
35c026eba3
Merge pull request #4586 from Polymer/fix-4585
...
Data notifications do not flush host if host has not initialized clients
2017-05-05 15:14:18 -07:00
Steve Orvell
787ae7496b
Merge pull request #4584 from Polymer/4575-kschaaf-dynamicfn-warnings
...
Ensure no warnings for dynamic fns. Fixes #4575
2017-05-05 15:03:35 -07:00
Steven Orvell
6f1dde7669
Fix comment.
2017-05-05 14:53:17 -07:00
Steven Orvell
3b6981d46f
Fixes #4585 . Data notifications do not flush host if host has not initialized clients. This preserves the Polymer 1.x guarantee that client dom is fully “readied” when data observers run.
2017-05-05 14:48:38 -07:00
Steve Orvell
a284d77d83
Merge pull request #4571 from Polymer/4550-remove-disable-upgrade
...
Removes the `disable-upgrade` feature from Polymer 2.0.
2017-04-28 09:49:06 -07:00
Steve Orvell
c46c577bcb
Merge pull request #4570 from Polymer/backtick-tags
...
Ensure tags in markdown are backtracked.
2017-04-28 09:35:11 -07:00
Steven Orvell
f821e46aa3
remove TemplateStamp’s implicit dependency on _initializeProperties
2017-04-27 15:25:25 -07:00
Steven Orvell
f15e4ee688
initialize properties in _initializeProperties rather than constructor (allows work to be done before _initializeProperties and is needed for proto/instance property initialization .
2017-04-27 12:06:36 -07:00
Steven Orvell
c1eda7af5a
LegacyElementMixin to @unrestricted
2017-04-27 10:49:27 -07:00
Steven Orvell
6a995a2383
set isAttached constructor (for closure) but set to undefined so not picked up as proto property (avoids initial binding value)
2017-04-27 10:43:34 -07:00
Steven Orvell
2c9ffac383
Fix dedupingMixin
2017-04-27 10:21:32 -07:00